brain

How to determine the voxel size in an image

Tools: SPM, cor2mni Assume the image is “a.img”, do v = spm_vol('a.img'); v.mat If v.mat is a diagonal matrix, you can simply read the number and they are the voxel size in mm. If not, a trick is to calculate the distance between adjacent
Xu Cui
40 sec read

SVM regression with libsvm

SVM is mostly commonly used for binary classifications. But one branch of SVM, SVM regression or SVR, is able to fit a continuous function to data. This is particularly useful when the predicted variable is continuous. Here I tried some very simple c
Xu Cui
1 min read

Brain surface plot with MatLab

This is an example of brain activation plotted on surface. In many circumstances surface view is much more straightforward than a slice view. Here is how I created such a plot using MatLab and SPM. Environment and Tools: Windows XP MatLab (v7.6) SPM
Xu Cui
1 min read

tcpip connection with pnet

We use TCP/UDP/IP Toolbox 2.0.5 to read and write data from/to a TCPIP port. It’s fast and reliable. The version we use is 2.0.5. Below is a matlab sample script showing how to connect to another computer (called ETG-4000) with TCPIP : %Connect
Xu Cui
1 min read

Noise removal in NIRS

Noise removal methods in NIRS can be divided into 4 categories: reducing noise based on its temporal characteristics: The instrument noise is usually in the high frequency band and thus can be removed by band pass filtering. Band pass filtering can a
Xu Cui
41 sec read

Reference slice in slice timing in SPM

I saw at least two web pages saying that the reference slice can be chosen during slice timing correction. For example, http://www.fil.ion.ucl.ac.uk/spm/doc/manual/spatial.htm. I disagree. Let’s take the first volume as example. Assume TR=2 and
Xu Cui
1 min read

spm_get, spm_select, and char

The mostly used functions I use in SPM is spm_get (for spm2) and spm_select (spm5 and 8).  These two functions are used to get files (usually image files). Frankly speaking I like spm_get much better as it’s intuitive and easy to use. Here is h
Xu Cui
1 min read

FSL environment setting

setenv FSLDIR /fs/quarry/cuixu/fsl41/fsl source ${FSLDIR}/etc/fslconf/fsl.csh setenv PATH ${FSLDIR}/bin:${PATH}
Xu Cui
3 sec read

Famous brains

Text source: http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach Talairach brain (single) the brain dissected and photographed for the famous Talairach and Tournoux atlas. The atlas has Brodmann’s areas labelled, albeit in a rather approximat
Xu Cui
57 sec read