[Mrtrix-discussion] Maximum track length using streamtrack
Donald Tournier
d.tournier at brain.org.au
Sun Jan 8 17:05:24 PST 2012
Hi all,
Just thought I'd add my 2 cents to the debate. The maximum length does
indeed refer to the maximum distance from the seed point, and I agree that
it could have been documented more explicitly. While I can see that it
sounds like a bug to allow streamtrack to generate streamlines that are
twice as long as specified, there is actually some logic behind it. The
main purpose of that option was to terminate streamlines that had started
to loop around themselves, or had done a U-turn, or taken some other such
implausible path. This is why the default maximum length is 20cm - the
length of your average brain. When using unidirectional tracking, this is
fine, but things get a bit messier with bidirectional tracking. If you
terminate the streamline in one direction because it's got too long, and
enforce the maximum length strictly, you won't allow bidirectional tracking
from that seed point.
This may or may not be fine, depending on your point of view. The way I see
things, the fact that the track might have got itself into a tangle on one
side of the seed point should not mean that tracking should not proceed on
the other side - the fact that it's got that long in the first place
probably reflects a failure of the tracking to terminate appropriately,
rather than a genuine anatomical feature, so whether you terminate at 20cm
or 40cm is irrelevant. There is a good argument to be made for discarding
the track altogether on those grounds, but if it's going to be kept, then I
think the other direction should be tracked too.
There is the associated problem that you might be using the maximum length
for some other purpose, for example to look at the tracks within a certain
distance of your seed region. In this case, you won't want to have your
tracks discarded due to their having exceeded the length threshold, but I
can see that in certain cases you might be surprised to find that many of
them are longer than the length you specified. Hopefully making the
documentation clearer will help...
Not sure what your take on it is, but we're open to suggestions as to how
best to handle this option - bearing in mind that there are many ways to do
tracking, and that the behaviour of that option should be at least vaguely
sensible in all cases...
Cheers,
Donald.
On 9 January 2012 11:20, Robert Smith <r.smith at brain.org.au> wrote:
> Thijs
>
> 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.
>
> 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):
> * in src/dwi/tractography/tracker/base.h, line 61:
>
> bool set (const Point& seed, const Point& seed_dir = Point::Invalid) { pos = seed; num_points = 0; return (init_direction (seed_dir)); }
>
>
> change to:
>
> bool set (const Point& seed, const Point& seed_dir = Point::Invalid) { pos = seed; return (init_direction (seed_dir)); }
>
>
>
> * in src/dwi/tractography/tracker/base.cpp, line 115:
>
> void Base::new_seed (const Point& seed_dir)
>
>
> At the start of this function (around line 117), insert this line:
>
> num_points = 0;
>
>
> I will see about making this the default behavior for the next MRtrix
> release.
>
> Regards
> Rob
>
> --
>
> Robert Smith
> Melbourne Brain Centre
> 245 Burgundy Street
> Heidelberg VIC 3084
> Telephone: (+61 3) 9035 7128
> Fax: (+61 3) 9035 7301
> Email: r.smith at brain.org.au
> www.florey.edu.au <http://www.fni.edu.au> www.brain.org.au
>
>
>
>
> On Fri, Jan 6, 2012 at 9:55 PM, Thijs Dhollander <
> thijs.dhollander at uzleuven.be> wrote:
>
>> Hi everyone,
>>
>>
>> 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?
>>
>>
>> Happy 2012 & kind regards,
>>
>> Thijs
>> _______________________________________________
>> Mrtrix-discussion mailing list
>> Mrtrix-discussion at www.nitrc.org
>> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>>
>
>
> _______________________________________________
> 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 9035 7033
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20120109/e7757052/attachment-0001.html
More information about the Mrtrix-discussion
mailing list