Dear Kim,
It's got me beaten. How do the images look if you do a check reg with
the original realigned images, displaying the 1st and second volumes of
the file?
Best regards,
-John
On Mon, 2009-09-28 at 09:53 -0400, Kim Celone wrote:
> Thanks Dr. Ashburner,
>
> I implemented the new code, however when I ran the normalization again
> it still did not fix things. I went through with the debugger and my
> nii files do not have the fields that you are looking for
> ('extras',Ni.extras,'mat), so my data never gets into the loop where
> you suggested the change. I am copying the structure of my files to
> determine if there is a problem with them. Also, it is probably worth
> mentioning that I use INRIAlign, instead of the standard SPM
> realignment process.
>
> NI: 1x1 nifti =
> NIFTI object: 1-by-1
> dat: [4-D file_array]
> mat: [4x4 double]
> mat_intent: 'Aligned'
> mat0: [4x4 double]
> mat0_intent: 'Aligned'
> descrip: 'spm - realigned'
>
>
> Thanks,
>
> Kim
>
>
> On Thu, Sep 24, 2009 at 2:07 PM, John Ashburner
> <[log in to unmask]> wrote:
> 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]>
>
>
>
--
John Ashburner <[log in to unmask]>
|