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
>
>
|