Hi Rik,
I haven't yet extended the Deformations thingy to handle Jacobian
determinants, so it is not yet able to do this. However, I am planning some
code to make it easier to spatially normalise groups of subjects with DARTEL.
For now, you could try the following (which was pasted from the mailing list
thread on "DARTEL in MNI space" or "DARTEL - modulated images in MNI space?"
===========================================================
For VBM, it may be easier to tweek the headers of the DARTEL warped images, so
that the affine transform in the headers is modified...
% Select files
PN = spm_select(1,'.*_sn.mat','Select sn.mat file');
PI = spm_select(inf,'nifti','Select images');
% Determine affine transform from header
sn = load(deblank(PN));
M = sn.VG(1).mat/(sn.VF(1).mat*sn.Affine);
% Scaling by inverse of Jacobian determinant, so that
% total tissue volumes are preserved.
scale = 1/abs(det(M(1:3,1:3)));
% Pre-multiply existing headers by affine transform
for i=1:size(PI,1),
% Read header
Ni = nifti(deblank(PI(i,:)));
% Pre-multiply existing header by affine transform
Ni.mat = M*Ni.mat;
Ni.mat_intent='MNI152';
% Change the scalefactor. This is like doing a "modulation"
Ni.dat.scl_slope = Ni.dat.scl_slope*scale;
% Write the header
create(Ni);
end
Note that the original affine voxel-to-world mappings are still saved in the
header (Ni.mat0).
===========================================================
Note also that images modified in this way are likely to cause future warning
messages about "qform0" matrices being rounded. You can generally ignore
these for all SPM applications (See the "DARTEL - modulated images in MNI
space?" thread).
Best regards,
-John
On Wednesday 28 January 2009 15:17, Rik Henson wrote:
> Hi John -
>
> Jonathan Peelle and I have a question about warping our Dartel'ed images
> into MNI space. In section 1.2.2 of your Dartel guide, you demonstrate
> how the Dartel flow fields and normalisation warps can be combined, but
> it wasn't clear to us whether Jacobean modulation of the voxel values
> can be applied when writing the normalised images (no option appears in
> the guide or the GUI) - or is this modulation not possible/necessary for
> some reason?
>
> Best wishes
> Rik and Jonathan
|