Hi,
Responses below.
Paul
On Wed, 1 May 2013 18:54:30 +0100, A a <[log in to unmask]> wrote:
>Hi Paul,
>
>That's fantastic. It works finally with me. However, the brain masking
>removed big part of the time series images. It says that the dimension is
>different or so. Two question if you do not mind:
>
>Do you use it after or before the realignment processing ?
Sorry, I should have said, the default brain mask is in standard space, so it will only work on spatially normalised images. I should have guessed you'd be working in native space if you have just one subject.
Realignment is something else, it's spatial normalisation that must happen before using a standard space mask.
As for TSNR calculation, I did mine on the preprocessed images (realigned, normalised, smoothed). It's probably a matter for discussion whether this is correct, but these are the images used for my model, so I think they were the most appropriate to use to calculate TSNR.
>
>If you I tried to get the mean of the tsnr.nii from your script, will this
>give me the mean of the time series >> this is important is I am following
>Murphy 2007 ( How long to scan ) paper in order to optimize the right
>number of volumes and the duration of the scan.. Thanks
I'm not sure I understand the question. Can you clarify. I'll guess though. It sounds like you're asking about the mean in the second script, for multiple subjects. In this case, the TSNR for each individual is mean / SD, and then the individual TSNR images are averaged over subjects to give a group mean. If you have just one subject, that won't take place. Perhaps you're asking something else ...
>
>AS
>
>
>On Wed, May 1, 2013 at 1:12 PM, Paul Wright <[log in to unmask]> wrote:
>
>> Hi AS,
>>
>> P is a list of file names, either a character array or a cell array of
>> strings. If you're doing one subject by hand use:
>>
>> P = spm_select(Inf,'image');
>>
>> which will open a file dialogue and save the image files you select as
>> variable P.
>>
>> If you have preprocessed the data, make sure you select only one set of
>> image, with the same prefix.
>>
>> Once you've done that, typing calc_tsnr(P); should give you an image
>> 'tsnr.nii' in the same directory. You will probably need to mask the TSNR
>> image with a brain mask, since voxels outside the brain can have very low
>> SD and appear to have high TSNR. You can do that using the attached script
>> (just type 'brainmask' then select 'tsnr.nii'). It multiplies the image by
>> the canonical SPM brain mask by default.
>>
>> Paul
>>
>>
>>
>> On Wed, 1 May 2013 13:04:46 +0100, A a <[log in to unmask]> wrote:
>>
>> >Hi Paul,
>> >
>> >I really appreciate your help. If you do not mind I have a couple of basic
>> >questions, I am a matlab beginner. So I think what I need is the first
>> >script, for individual, as this is what I have, a single session for one
>> >subject. What I need to modify is the P in the script. So should I add all
>> >the volumes ( the function data together as you get from the scanner ) ?
>> >The only problem that I faced is loading the image in a correct way. I
>> used
>> >load_nifti but what I get is a structure file that contains hdr img ..etc.
>> >Should I load this one as P? Also when you mentioned modifying the script
>> >you mean to identify P in :
>> >
>> >% What is P?
>> >if isstruct(P)
>> >
>> >When i reach to this command it says no enough argument..
>> >
>> > Where is the functional data in SPM.mat if it is easier to be used ?
>> >
>> >Thanks, and sorry about these basic questions
>> >
>> >
>> >On Wed, May 1, 2013 at 12:19 PM, Paul Wright <[log in to unmask]> wrote:
>> >
>> >> Hi AS, I've been using TSNR myself recently. As you say, it's simply
>> mean
>> >> / SD over the images in a time series. This can be calculated at each
>> voxel
>> >> for each subject and session and then combined to give a "coverage map"
>> for
>> >> the group. The individual or group maps can be used as an alternative to
>> >> implicit masking to set the spatial limits of your analysis. I'm
>> attaching
>> >> two Matlab files that calculate TSNR. The function calc_tsnr.m makes
>> >> individual TSNR images, either from a list of image files or from the
>> files
>> >> for each session specified by an SPM.mat file. The second script
>> >> calculate_tsnr_script.m batches the process for a set of subjects. In
>> this
>> >> case it searches for images based on prefix, using all matching images
>> in
>> >> the directory. You'll need to modify it for your experiment. You could
>> also
>> >> adapt it so it uses an SPM.mat file. I hope these help. These are my
>> >> personal scripts, not published, so are provided as is. Use at your own
>> >> risk and check results are sensible etc. Best wishes, Paul Wright On
>> Wed, 1
>> >> May 2013 11:40:25 +0100, AS T.N ** wrote: >Hello, > >I know such a
>> >> question may not be posted here but I know there are lots of fMRI
>> experts.
>> >> > >I need to calculate the Temporal SNR for my fmrI data series. I
>> found a
>> >> nice paper the explains it ( Murphy et al 2007). I did that by taking
>> the
>> >> whole mean of the signal from the data and divide it by its std. I am
>> sure
>> >> that I missing something and there are accurate way to do it. Can
>> someone
>> >> please tell me or guide me to how I do it correctly in a practical
>> terms?
>> >> Can SPM help me here ? > >Thanks > >AS
>> >
>>
>>
>
|