The deformations file is written out at the resolution of the template,
whereas spatially normalised images can be written out at whatever
resolution and image dimensions you choose (as specified by bounding box
and voxel sizes).
In the Deformations utility, there is the option to include an identity
transform, which can be composed with the other transforms. This can be
used to change the resolution and dimensions of the resulting output.
Best regards,
-John
On Tue, 2009-08-18 at 15:24 -0700, Darryl H. Hwang wrote:
> We have been using SPM2 for many years as the basis for many of our
> normalization processes. One crucial file was the deformation file
> generated by SPM2. As an Analyze75 file, it was easily read by into
> Matlab using build in function. Now SPM8 uses the .nii file format.
> I've isolated the SPM8 function necessary to decode this file format,
> but I've found some odd problems which have confused me on how the
> deformations are currently applied.
>
>
>
> In SPM2, the deformation file generate contained a 4 dimensional
> matrix of which the first three components were the same size as the
> target image. This allowed me to calculate each voxel in template
> space as a floating point number in the source image space. In SPM8,
> the results are different. After calculating the deformation .nii
> file, I read it using the following lines.
>
>
>
> P=[repmat(fullfile(pwd,'y_Bzero.nii'),3,1), [',1,1';',1,2';',1,3']]
>
> V=spm_vol(P);
>
> Def=cell(3,1);
>
> Def{1} = spm_load_float(V(1));
>
> Def{2} = spm_load_float(V(2));
>
> Def{3} = spm_load_float(V(3));
>
> mat = V(1).mat;
>
>
>
> The Def variable offers an odd matrix size. The source image is
> 128x128x28 and the normalized image is 79x95x68 (another oddity for me
> because the normalized image size in SPM2 was 79x95x69).
> Normalization was done using the EPI.nii template. The deformation
> file list three Def cells which are 91x109x91. I'm now lost because by
> I don't have the one to one correspondence which I had before in the
> SPM2 deformation files. Can somebody explain this change and also how
> to calculate the target voxel space to source voxel space transform
> using this new file.
>
>
>
> Darryl H. Hwang
>
> Ph.D. Candidate
>
> USC Biomedical Imaging Lab
>
>
>
>
--
John Ashburner <[log in to unmask]>
|