Thanks for this. I think you found a bug in terms of how it handles 4D
data with associated .mat files. At around line 205 of
spm8/toolbox/DARTEL/spm_dartel_norm_fun.m , you'll find the lines:
M0 = NI.mat;
if isfield(NI,'extras') && isfield(NI.extras,'mat'),
M1 = NI.extras.mat;
if size(M1,3) >= j && sum(sum(M1(:,:,j).^2)) ~=0,
M0 = M1;
end
end
Changing them to the following should fix the problem:
M0 = NI.mat;
if isfield(NI,'extras') && isfield(NI.extras,'mat'),
M1 = NI.extras.mat;
if size(M1,3) >= j && sum(sum(M1(:,:,j).^2)) ~=0,
M0 = M1(:,:,j);
end
end
Best regards,
-John
On Tue, 2009-09-22 at 09:03 -0400, Kim Celone wrote:
> Hi,
> I'm reposting this post because I misspoke and said 3D instead of 4D
> nii files:
>
> I have recently downloaded all of the most recent updates for spm, but
> I am still having difficulty using dartel to normalize my 4D nii BOLD
> data. I cannot list how many timepoints there are during file
> selection like you can in during other processing steps so when I'm
> setting up the batch it only has my BOLD images listed as one image.
> This seemed to be ok, because it listed all of the correct dimensions
> while it was running the normalization. After it's finished, however,
> only the first image of the 3D set normalized correctly (correct voxel
> size and orientation) and all the others are in the original voxel
> size and are flipped in the y direction.
>
> The import and create template ran just fine, and the output looks
> great, so suggestions would be very appreciated!!
>
> Thanks,
>
> Kim Celone
> Center for Memory and Brain
> Boston University
--
John Ashburner <[log in to unmask]>
|