Print

Print


Thanks again for the guidance,

Here is the situation I am facing and is driving me crazy!

I am using SPM2 for now
I convert my images to the T2 space using spm_coreg then I reslice them
as you said. After you reslice them it produces an image with 'r' at the
beginning of the image name.

Then I read images with matlab analyze75read function and when I
calculate the difference before and after re-slicing I get all zeros
meaning nothing has changed.

Same situation with re-align, I realign and then re-slice, then I read
the images using matlab analyze75read function and the difference is
zero.

Should I not use analyze75read function from matlab when I am doing
things with SPM?

What do you think?

But still, if the reslice resamples the image using the B-spline
interpolation I should observe some differences, right?

I would really appreciate your feedback and help

Thank you very much

-P


-----Original Message-----
From: Volkmar Glauche [mailto:[log in to unmask]] 
Sent: Thursday, November 20, 2008 12:58 PM
To: Mojabi, Pouria
Subject: RE: [SPM] spm realign

It depends which version of SPM you are using. Prior to SPM5, it would  
update .mat files. Starting with SPM5, SPM supports the NIfTI format  
which stores the orientation in the header .hdr or the header part of  
the single file .nii.
Realignment without reslice will move your image matrix around in  
mm-space, without changing the values of the voxels. I.e. voxel  
(1,1,1) in image1 will be at a different position than voxel (1,1,1)  
in image2. Only if you reslice the images, you can do a voxel by voxel  
averaging.
I would recommend you to use SPM8b, and perhaps also have a look at  
the batch system which provides a structured, more abstract interface  
to SPM functionality
and has hooks to add your own code to it.

Volkmar

Quoting "Mojabi, Pouria" <[log in to unmask]>:

> One thing I observed if you don't provide output it won't update the
> header it just updates the associated mat file, correct me if I am
> wrong, and for the spm_reslice it writes images again which are
> basically the same images but just different mat files
>
> Let's say I want to do averaging but I don't want to use spm functions
> for my averaging, what I need is realigned images as an input.
>
> Let me know what you think
>
> Thank you again
>
> -P
>
>
>
> -----Original Message-----
> From: Volkmar Glauche [mailto:[log in to unmask]]
> Sent: Thursday, November 20, 2008 11:36 AM
> To: Mojabi, Pouria
> Cc: [log in to unmask]
> Subject: Re: [SPM] spm realign
>
> Dear Pouria,
>
> if you use spm_realign without output arguments, it will update the
> image headers with the new positions for you. Note that this does not
> reslice the images to a common voxel space. If you want the images to
> all have the same orientation again, you need to run spm_reslice as
> well.
> If you need the realignment parameters as output argument, then you
> have to apply them to your image headers yourself. See the if
> nargout==0 in spm_realign.m around line 136 how this is done.
>
> Quoting "Mojabi, Pouria" <[log in to unmask]>:
>
>> Dear SPMers!
>>
>> Hope all is well.
>>
>> I have recently started playing around with SPM functions to do my
ASL
>> perfusion.
>> There is something I am really confused about and was wondering if
you
>> could kindly please give me some hints or notes I can read further.
>>
>> I want to realign my images of the same subject, they all belong to
> the
>> same modality, I use spm_realign and I pass the images names, it
gives
>> me back a structure that has the matrix in it. The way I understood
it
> u
>> need this matrix to map the images to each others space; that is
M2/M1
>> to map image2 to image1
>> Now do I need to scan each image and transform every pixel to new
> pixel
>> coordinate using M2/M1 ?
>>
>> Thank you very much indeed for the help
>>
>>
>> --------------
>>
>> Pouria Mojabi
>>
>> Research Associate
>>
>> Center for Imaging of Neurodegenerative Diseases (CIND)
>> VA Medical Center
>> 4150 Clement Street,
>> San Francisco, CA 94121
>> phone: 415-221-4810 x4222
>>
>>
>
>
>
>
>
>