Print

Print


The outputs from HDW are a deformation field (y*) and a map of
Jacobian determinants (j*).  Using these, there are various ways to
examine volumetric changes.

Probably the easiest is to look for volumetric changes to the GM of
each subject.  To do this, you'll need to segment the fixed image to
obtain the GM and then combine this with the Jacobians.  This can be
done via ImCalc, by evaluating i1.*(i2-1), where i1 is the GM of the
fixed image and i2 is the map of Jacobians from HDW.  I'll let you
unpick what the expression actually encodes.

Then you'd spatially normalise these manipulated data and smooth.
Finally, you could do a GLM stuff in the usual way.

Best regards,
-John



On 16 February 2012 16:39, Yago Diez <[log in to unmask]> wrote:
> Hi,
>
> After a few days I am getting my first serious results with SPM (mainly
> thanks to previous answers in this thread:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=SPM;c16dfcdf.1202 , special
> thanks go to John Ashburner who got me on the right track).
>
> I, still have some hopefully minor doubt. The input of my problem is now two
> images that I know have previously been rigidly aligned. I am now executing
> HDW via GUI and via a smal script that I could make via the batch job saving
> tools with some modifications. The script follows:
>
>> spm('defaults','fmri');
>> spm_jobman('initcfg');
>>
>> ref = 'PATH/Fixed.nii'
>>
>> mov = 'PATH/Moving.nii'
>>
>> jac = 'PATH/jy_Moving.nii'
>>>
>>>
>>> matlabbatch{1}.spm.tools.hdw.data.ref = {ref};
>>> matlabbatch{1}.spm.tools.hdw.data.mov = {mov};
>>> matlabbatch{1}.spm.tools.hdw.bias_opts.nits = 8;
>>> matlabbatch{1}.spm.tools.hdw.bias_opts.fwhm = 60;
>>> matlabbatch{1}.spm.tools.hdw.bias_opts.reg = 1e-06;
>>> matlabbatch{1}.spm.tools.hdw.bias_opts.lmreg = 1e-06;
>>> matlabbatch{1}.spm.tools.hdw.warp_opts.nits = 500;
>>> matlabbatch{1}.spm.tools.hdw.warp_opts.reg = 4;
>>>
>>> matlabbatch{2}.spm.util.imcalc.input = {mov,jac};
>>> matlabbatch{2}.spm.util.imcalc.output = 'outputImage.nii';
>>> matlabbatch{2}.spm.util.imcalc.outdir = {''};
>>> matlabbatch{2}.spm.util.imcalc.expression = 'i1.*(i2)';
>>> matlabbatch{2}.spm.util.imcalc.options.dmtx = 0;
>>> matlabbatch{2}.spm.util.imcalc.options.mask = 0;
>>> matlabbatch{2}.spm.util.imcalc.options.interp = 1;
>>> matlabbatch{2}.spm.util.imcalc.options.dtype = 4;
>
>
>
> But I am not completely sure how HDW output works.
>
> From https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=spm;8ed6f768.1008 and
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=SPM;4ce9f84c.0912
>
> I have found out  that the output deformation is stored in the y_ file.
>
> Can I assume safely that matlabbatch{2} above computes the actual warped
> image and stores it in a file called outputImage.nii?
>
> mainly
>
> matlabbatch{2}.spm.util.imcalc.expression = 'i1.*(i2)';
>
> should be applying the jacobian deformation field stored in the y_ file to
> the moving image.
>
> Again, thanks very much for your help.
>
> --
> Yago Diez Donoso
> Computer Vision and Robotics Group http://vicorob.udg.es/
> E-mail: [log in to unmask]
> Phone: (int. code) 34 972418013
> University of Girona