Print

Print


Or you could simply use the ImageCalculator, and read the data into a datamatrix, if you want to detrend your data in advance you can use spm_filter which can also be applied on a data matrix.

Best
Torben




Torben Ellegaard Lund
Associate Professor, PhD
Center of Functionally Integrative Neuroscience (CFIN)
Aarhus University
Aarhus University Hospital
Building 10G, 5th floor, room 31
Noerrebrogade 44
8000 Aarhus C
Denmark
Phone: +4589494380
Fax: +4589494400
http://www.cfin.au.dk
[log in to unmask]



Den Uge:4 25/01/2012 kl. 17.14 skrev Satrajit Ghosh:

> you can use something like the following in matlab:
> 
> ----
> y = spm_read_vols(spm_vol(4d_realigned_file));
> mean_y = mean(y,4);
> std_y = std(y, [], 4);
> tsnr = mean_y./std_y;
> 
> v = spm_vol(4d_realigned_file);
> v1 = v(1);
> v1.fname = 'tsnr.nii';
> spm_write_vol(v1, tsnr);
> ----
> 
> but this doesn't do any detrending of the data before calculating tsnr.
> 
> cheers,
> 
> satra
> 
> 
> On Wed, Jan 25, 2012 at 10:44 AM, Maartje Luijten <[log in to unmask]> wrote:
> Dear Satra,
> 
> Thanks for your reply!
> Unfortunately, I am not familiar with python.. Do you have alternative suggestions? 
> 
> Maartje
> 
> 
> 
> On 25-Jan-12 4:33 PM, Satrajit Ghosh wrote:
>> 
>> hi,
>> 
>> if you are comfortable with python, you can do this very easily with nibabel and numpy. there is also a TSNR interface in the nipype package.
>> 
>> http://www.mit.edu/~satra/nipype-nightly/interfaces/generated/nipype.algorithms.misc.html#tsnr
>> 
>> cheers,
>> 
>> satra
>> 
>> On Wed, Jan 25, 2012 at 9:53 AM, Maartje Luijten <[log in to unmask]> wrote:
>> Dear All,
>> 
>> I would like to calculate voxel-wise signal to noise maps and temporal signal to noise maps (functions in signal to noise over time).
>> Does anyone knows how to do this (possible using imcalc or a script)?
>> 
>> I searched on the mailinglist archives and found the message below. Unfortunately, the message that is referred to is no longer available.
>> 
>> All suggestions are welcome.
>> 
>> Thanks a lot!
>> Maartje
>> 
>> Hi,
>> 
>> If you want a voxelwise mean over a voxelwise standard deviation for a
>> bunch of images, i.e. you want an SNR image, then use spm_imcalc_ui as
>> in this post:
>> 
>> http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind0608&L=SPM&P=R45864  <http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind0608&L=SPM&P=R45864>
>> 
>> If you want mean over std of the voxels of a single image, then the
>> attached should do the trick. And if you want something else, please
>> ask again!
>> 
>> Best,
>> Ged.
>> 
>> 
>> -- 
>> Maartje Luijten, MSc
>> Institute of Psychology
>> Erasmus University Rotterdam
>> Woudestein T13-07
>> PO Box 1738
>> 3000 DR Rotterdam
>> The Netherlands
>> Tel: +31 10 408 9729
>> Mob: +31 647 949 807
>> Fax: +31 10 408 9009
>> E-mail: [log in to unmask]
>> 
> 
> -- 
> Maartje Luijten, MSc
> Institute of Psychology
> Erasmus University Rotterdam
> Woudestein T13-07
> PO Box 1738
> 3000 DR Rotterdam
> The Netherlands
> Tel: +31 10 408 9729
> Mob: +31 647 949 807
> Fax: +31 10 408 9009
> E-mail: [log in to unmask]
>