Hi Ping,<div><br></div><div>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.</div>
<div><br></div><div>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:</div><div><br></div><div>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:</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>$ gen_unit_warp /opt/SPM8/templates/T1.nii warp-[].nii</div><div><br></div><div>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. </div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>This should generate 3 new files: wwarp-*.nii, which can be used directly in "normalise_tracks":</div><div><br></div><div>$ normalise_tracks tracks.tck wwarp-[].nii tracks_normalised.tck</div>
<div><br></div><div>Obviously the steps would be very different depending on the normalisation package you're using, but the idea would be the same.</div><div><br></div><div>Hope that clarifies things a little.</div><div>
Cheers,</div><div><br></div><div>Donald.</div><div><br></div><div><br></div><div><div class="gmail_quote">On 7 January 2011 15:47, Ping-Hong Yeh <span dir="ltr"><<a href="mailto:pinghongyeh@gmail.com">pinghongyeh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello all,<br>
<br>
I would like to transforming the tracks to the template space, but<br>
not sure how to apply the transformation matrix (4 by4 Ascii) using<br>
"normalise_tracks".<br>
How should the normalisation map be created? Thanks.<br>
<br>
Ping<br>
_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jacques-Donald Tournier (PhD)<br>Brain Research Institute, Melbourne, Australia<br>Tel: +61 (0)3 9496 4078<br>
</div>