> I found spm_hread and spm_write part of the spm2, I just didn't know
> it existed. I am writing a batch file to modify voxel dimensions. This
> would do the job nicely.
I'll anticipate a possible next question, which is likely to be why SPM is not
reading the new headers. Changing the voxel sizes in the image will only
make a difference for SPM2 if there are no .mat files. If .mat files exist,
then the voxel sizes will be read from these instead. I tend to do all such
manipulations using e.g. spm_get_space.m . This produces a matrix, which
encodes voxel sizes and other stuff (origins, orientations etc). The
spm_matrix.m and spm_imatrix.m functions can be used to generate such
matrices from a certain parameterisation, and also to obtain the
parameterisation from the matrix.
Best regards,
-John
|