> My MATLAB coding knowledge is limited, but I looked at the functions you
> mentioned and I sort of understand. I am able to produce the composition
> (A o B) as a y_warp.nii. Is there a way to translate j and/or y (from
> dartel3 function) into an *sn.mat file, or modulate an image by j or y?
There's no way of doing this very accurately. The sn.mat files only use 1632
parameters (12 + 6 x 9 x 10 x 3) to define the deformations. DARTEL uses
about 6,000,000 parameters.
> How do y and j relate to the matrices Affine and Tr?
Affine encodes a 12-parameter affine transform. Tr encodes a nonlinear
deformation in terms of cosine transform coefficients.
> Tr for our images
> have the dimensions 6 x 9 x 10 x 3 -- is that always the case, and can you
> tell me what each of these dimensions refers to?
It varies depending on the FOV and the frequency cutoff that is specified.
> When you used dartel3
> below, how did you pick 6 as the number of recursions?
This is the default number used for the actual registration (2^6=64).
Best regards,
-John
> -----Original Message-----
> From: John Ashburner [mailto:[log in to unmask]]
> Sent: Wednesday, October 29, 2008 9:35 AM
> To: Dana Perantie; [log in to unmask]
> Subject: Re: [SPM] combining non-linear warps
>
> Dear Dana,
>
> There's nothing in the Deformations Utility for doing this in a nice easy
> way, but it could be done by working with the Jacobian fields that can be
> written out to disk. The toolbox/DARTEL/spm_dartel_norm.m function is used
> for writing normalised data.
>
> I'm not sure how your MATLAB coding is, but you could do it using some code
> along the lines of...
>
> N1 = nifti('u_image1.nii');
> N2 = nifti('u_image1.nii');
> u1 = squeeze(single(N1.dat(:,:,:,:,:)));
> u2 = squeeze(single(N2.dat(:,:,:,:,:)));
>
> [y1,j1] = dartel3('Exp', u1, [6 1 1]);
> [y2,j2] = dartel3('Exp', u2, [6 -1 1]);
>
> y3 = dartel3('comp', y1, y2);
> j3 = dartel3('samp',j1,y2).*j2;
>
> There'll be a bit more to it than this though.
>
>
> All the best,
> -John
>
> On Tuesday 28 October 2008 19:34, Dana Perantie wrote:
> > Thanks John,
> > The Deformations utility is going to be very helpful, and so are the
> > instructions in the DARTEL manual.
> >
> > Is there also a simple way to "modulate" by a flow field *without*
> > applying the flow field at the same time? I want to warp a whole brain
> > image by A and later by B, segment the output of that and then modulate
> > the segments by the composition (A o B). If there is not already a GUI to
> > do that, could you please point me to the *.m file for DARTEL's "Create
> > Warped" so I may pick out the modulation step from there?
> >
> > Thanks again,
> > Dana
> >
> >
> > -----Original Message-----
> > From: John Ashburner [mailto:[log in to unmask]]
> > Sent: Friday, October 17, 2008 10:16 AM
> > To: Dana Perantie; [log in to unmask]
> > Subject: Re: [SPM] combining non-linear warps
> >
> > I forgot to mention that the approach involves the Deformations utility,
> > available from the Tasks pulldown. There is some documentation about how
> > to use it in the http://www.fil.ion.ucl.ac.uk/~john/misc/dartel_guide.pdf
> > file (or the SPM8b manual).
> >
> > Best regards,
> > -John
> >
> > -----Original Message-----
> > From: John Ashburner [mailto:[log in to unmask]]
> > Sent: Friday, October 17, 2008 10:14 AM
> > To: Dana Perantie; [log in to unmask]
> > Subject: Re: [SPM] combining non-linear warps
> >
> > There's no tool for generating a new sn.mat file, but you can generate a
> > y_*.nii, which could be used for the same thing.
> >
> > Best regards,
> > -John
> >
> > On Thursday 16 October 2008 21:07, Dana Perantie wrote:
> > > Hello SPM list,
> > > Is there a way to combine non-linear warp parameters, i.e. if I warp A
> > > to B and B to C, is there a way to combine the *sn.mat files to make a
> > > *.mat representing the warp from A to C? Thank you,
> > > Dana
|