Hi Sebastian,
I tried the same thing using Coregister->Reslice only in SPM8, with interpolation set to nearest neighbour, and resliced the MRIcron BA atlas to the SPM brain mask (./spm8/apriori/brainmask.nii). The resulting image had only integer values.
Script would be as follows:
P = {'target.nii' 'brodmann.nii'};
flags.interp = 0;
spm_reslice(P,flags);
That should give you the atlas in the new dimensions, with original integer values (worked for me!)
The problem may also be something to do with the 'dtype' flag in spm_imcalc. When you call it via matlabbatch, the data type of the output image is set to that of the first image. If the target image is a con image (float32) and the atlas is uint8, that may introduce rounding, but I'm not sure. It looks like spm_reslice preserves the data type of the input image (I tried using a con image as a target, and the data type did not change.
Note that you can use spm_imcalc to do calculations on two volume structures, that way you control the data type directly. That differs from spm_imcalc_ui, which will take a filename, but changes the data type just like the matlabbatch method.
Cheers,
Paul
|