Print

Print


It will use the sform matrices in the NIfTI headers as starting
estimates.  If realignment has been run once, the estimated results
will have been incorporated into the sform matrices.

If you want to reset the information to how it was originally, then
simply write the sform matrix from the first image into all the
others.  Here's a slightly dangerous snippet of code to do this:

P=spm_select(Inf,'nifti'); % Select files
Nii = nifti(P); % Read header info

M = Nii(1).mat; % Get orientation of first image

for i=2:numel(Nii), % Loop over the other images
    Nii(i).mat = M; % Change the header information for that image
    create(Nii(i)); % Write the header to disk
end

Best regards,
-John


On 15 August 2012 19:29, Jared Torre <[log in to unmask]> wrote:
> Dear SPM Experts,
>
> I am wondering what the consequences are of running realignment on already
> realigned data in my particular case.  The data set I am using has been
> preprocessed before using SPM, but I am redoing it by starting with the same
> original .img/.hdr files used before (deleting the smoothed and warped files
> prepended with 's' and 'sw' and using the files that are ostensibly
> unaltered by preprocessing).  The option to create a mean image only was
> selected during realignment and no other new files (such as those appended
> with the 'r' prefix or any .mat files) were created in the input folder
> during either preprocessing attempt.
>
> I am wondering if this realignment process in SPM overwrites the original
> .img/.hdr files in any way and what the consequence of re-realigning images
> (accidental or otherwise) would be downstream in the analysis in this case
> (e.g. added step of interpolation, reduced spatial resolution, or perhaps
> something even less desirable of which I am unaware).
>
> Thank you for your help,
> Jared
>
> _______________________________
> Jared Torre
> Doctoral Student
> UCLA Department of Psychology
> 1285 Franz Hall
> [log in to unmask] | 818.642.2907
>
>