<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Courier New;color: #000000;font-size: 12pt;">
Dear MRtrix users,<br>
<br>
I would like to plot tracks with respect to the seed mask. I would especially like to show where tracks originate within the seed mask. However, I am having trouble obtaining a precise alignment.<br>
<br>
I've seen Donald's reply to "DISCREPANCY in voxel2world matrices between mrtrix and spm". He describes how to load tracks alongside images. I've followed his steps with a set of my own tracks, using the transform and dimensions of a seed mask image.<br>
<br>
Then I plotted the very first vertex of each track to see where it fell within the seed mask. The mask, I loaded in Matlab using the following steps:<br>
<br>
% Read in the mask.<br>
seed = read_mrtrix( 'seed_mask.mif' ) ;<br>
<br>
% Find the x-y-z index i.e. subscript index for each<br>
% voxel in the mask. It is a binary mask. Voxels in the<br>
% mask are marked with 1, and background voxels are 0.<br>
i = find( 0 < seed.data(:) ) ;<br>
[ s.x , s.y , s.z ] = ind2sub( seed.dim , i ) ;<br>
<br>
My understanding is that MRtrix indexing starts at 0. Therefore, I subtract 1 from s.x, s.y, and s.z to get the lower left-hand corner at the back of each voxel, in units of voxel indeces. Note, the layout is '+0,+1,+2' meaning that indexing should move left
to right, posterior to anterior, and inferior to superior along the x, y, and z axes.<br>
<br>
But when I plot the starting vertices of each track onto an outline of the seed voxels, I find that they are slightly misaligned. Note that tracking was done without interpolating the seed mask.<br>
<br>
A solution appears to be that I must subtract 1.5 from the subscripts in s.x, s.y, and s.z rather than just 1. This works very well. But I do not know where the extra 0.5 has come from. I'm happy that it works, but unsettled that I don't know why. Could anyone
please explain the extra 0.5?<br>
<br>
Kind regards,<br>
Jackson<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font face="Courier New" size="3">---------------------------<br>
<font color="000000">Dept of Phys, Anat and Gen<br>
University of Oxford<br>
Sherrington Bld, Parks Rd<br>
Oxford, OX1 3PT<br>
United Kingdom<br>
<br>
</font></font><font size="2" color="000000"><font face="Courier New" size="3">Tel: 01865 282 549</font><font size="3"><br>
</font><font face="Courier New"><font size="3">jackson.smith@dpag.ox.ac.uk<br>
<font color="000000">---------------------------</font></font><br>
</font></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>