Thijs<br><br>Nice pickup; indeed yes, the tracking is allowing streamlines to continue up to the specified maximum length in either direction from the seed, such that it is possible for streamlines to be generated which are up to twice the 'maximum' length.<br>
<br>If you want to enforce your specified maximum length as a constraint upon the entire streamline rather than each unidirectional half-streamline, the easiest fix is as follows (in reference to the 0.2.9 code):<br>* in src/dwi/tractography/tracker/base.h, line 61:<br>
<pre class="prettyprint "><span class="kwd">bool</span><span class="pln"> </span><span class="kwd">set</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">const</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">&</span><span class="pln"> seed</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">const</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">&</span><span class="pln"> seed_dir </span><span class="pun">=</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">::</span><span class="typ">Invalid</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> pos </span><span class="pun">=</span><span class="pln"> seed</span><span class="pun">;</span><span class="pln"> num_points </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> </span><span class="kwd">return</span><span class="pln"> </span><span class="pun">(</span><span class="pln">init_direction </span><span class="pun">(</span><span class="pln">seed_dir</span><span class="pun">));</span><span class="pln"> </span><span class="pun">}</span><span class="pln"><br>
</span></pre>change to:<br><pre class="prettyprint "><span class="kwd">bool</span><span class="pln"> </span><span class="kwd">set</span><span class="pln"> </span><span class="pun">(</span><span class="kwd">const</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">&</span><span class="pln"> seed</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">const</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">&</span><span class="pln"> seed_dir </span><span class="pun">=</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">::</span><span class="typ">Invalid</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> pos </span><span class="pun">=</span><span class="pln"> seed</span><span class="pun">;</span><span class="pln"></span><span class="pun"></span><span class="pln"> </span><span class="kwd">return</span><span class="pln"> </span><span class="pun">(</span><span class="pln">init_direction </span><span class="pun">(</span><span class="pln">seed_dir</span><span class="pun">));</span><span class="pln"> </span><span class="pun">}</span><span class="pln"><br>
</span></pre>
<br>* in src/dwi/tractography/tracker/base.cpp, line 115:<br><pre class="prettyprint lang-cpp"><span class="kwd">void</span><span class="pln"> </span><span class="typ">Base</span><span class="pun">::</span><span class="pln">new_seed </span><span class="pun">(</span><span class="kwd">const</span><span class="pln"> </span><span class="typ">Point</span><span class="pun">&</span><span class="pln"> seed_dir</span><span class="pun">)</span><span class="pln"><br>
</span></pre>At the start of this function (around line 117), insert this line:<br><pre class="prettyprint "><span class="pln">num_points </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">;</span><span class="pln"> </span></pre>
<br>I will see about making this the default behavior for the next MRtrix release.<br><br>Regards<br>Rob<br clear="all"><br>--<br><br>Robert Smith<br>Melbourne Brain Centre<br>245 Burgundy Street<br>Heidelberg VIC 3084<br>
Telephone: (+61 3) 9035 7128<br>Fax: (+61 3) 9035 7301<br>Email: <a href="mailto:r.smith@brain.org.au" target="_blank">r.smith@brain.org.au</a><br><a href="http://www.fni.edu.au" target="_blank">www.florey.edu.au</a> <a href="http://www.brain.org.au" target="_blank">www.brain.org.au</a><br>
<span style="font-size:9pt;font-family:"Times New Roman","serif";color:red"></span><br>
<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 9:55 PM, Thijs Dhollander <span dir="ltr"><<a href="mailto:thijs.dhollander@uzleuven.be">thijs.dhollander@uzleuven.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
<br>
<br>
Using Mrtrix 0.2.9, I noticed the following: when setting the -length parameter with streamtrack ("max_dist" as reported by track_info afterwards), the actual maximum track length seems to be twice that value. I suspect each track is allowed to continue up to the "-length"-distance in both directions from the seed, i.e. allowing the full track to be maximally twice the "-length" value in size?<br>
<br>
<br>
Happy 2012 & kind regards,<br>
<br>
Thijs<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>