[Mrtrix-discussion] transform and normalise tracks

Donald Tournier d.tournier at brain.org.au
Sun Jan 9 23:14:38 PST 2011


Hi Ping,

Unfortunately, the 'normalise_tracks' command can't be used to apply a 4x4
affine transform: it's designed to apply a non-linear warp to the track
data. The warp information should be supplied as a 4D image, where the
values for each voxel are set to the coordinates that this voxel maps to. To
help generate the warp, there is a utility called 'gen_unit_warp', which
will generate a 'no warp' image (i.e. each voxel contains its own location),
to which you can apply the relevant inverse warp using whatever software
package you use for your normalisation (FSL, SPM, etc). You can then feed
the result to 'normalise_tracks' as the transform image.

Getting the details can be quite tricky, so here is an example using SPM8,
using the warp computed by normalising a T1 image (anat.nii) previously
coregistered with the FA:

Assuming you are normlising to the default T1 template image (T1.nii)
supplied with SPM8, start by generating a unit warp image using that as a
template:

$ gen_unit_warp /opt/SPM8/templates/T1.nii warp-[].nii

Note that the output image has been specified as a multi-file NIfTI, so this
should produce the files warp-1.nii, warp-2.nii & warp-3.nii.

Then estimate the warp you're interested in applying. In SPM8, select
SPM->Spatial->Normalise->Estimate in the batch editor, specify the anat.nii
as the source image, and T1.nii as the template, and run. This will generate
the warp information as a "anat_sn.mat" file.

Then, apply the inverse warp to your warp-*.nii images: select
SPM->Util->Deformations in the batch editor, choose "New: inverse" as the
composition, then "New: Imported _sn.mat" as its composition, "anat_sn.mat"
as the parameter file, and your fa.nii as the "image to base inverse on".
Specify all 3 wrap-*.nii in the "apply to" field, and run.

This should generate 3 new files: wwarp-*.nii, which can be used directly in
"normalise_tracks":

$ normalise_tracks tracks.tck wwarp-[].nii tracks_normalised.tck

Obviously the steps would be very different depending on the normalisation
package you're using, but the idea would be the same.

Hope that clarifies things a little.
Cheers,

Donald.


On 7 January 2011 15:47, Ping-Hong Yeh <pinghongyeh at gmail.com> wrote:

> Hello all,
>
>  I would like to transforming the tracks to the template space, but
> not sure how to apply the transformation matrix (4 by4 Ascii) using
> "normalise_tracks".
> How should the normalisation map be created?   Thanks.
>
> Ping
> _______________________________________________
> Mrtrix-discussion mailing list
> Mrtrix-discussion at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>



-- 
Jacques-Donald Tournier (PhD)
Brain Research Institute, Melbourne, Australia
Tel: +61 (0)3 9496 4078
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20110110/181f3fe3/attachment.html


More information about the Mrtrix-discussion mailing list