[Mrtrix-discussion] Default values for trials and initcutoff

Robert Smith r.smith at brain.org.au
Tue Aug 27 17:22:39 PDT 2013


Hi Jesse,

Firstly, the default values provided in the OPTIONS {} section of the
cmd/*.cpp files are basically ignored. The upper and lower bounds defined
here are used to terminate the binary if you provide a value outside the
bounds, but the only place I can see that the default values are used is if
you run a binary with a single argument "__print_full_usage__" (never knew
about this one myself until now). Therefore any default parameters for any
binary must be set within the EXECUTE {} macro or any functions called
within it.

The references I'm providing here are from the most up-to-date code in the SVN
repository <https://code.google.com/p/mrtrix/>. If your code is from an
older version, you may need to cross-reference, although I don't think this
code has changed in a while.

   1. If you manually provide the "-trials" option, it gets added to the
   Tractography::Properties class at cmd/streamtrack.cpp:453. If you're using
   the SD_PROB algorithm (which is the only one that makes use of this
   parameter), the tracking threads are allocated at cmd/streamtrack.cpp:248.
   The default value of 50 is set in the constructor at
   src/dwi/tractography/tracker/sd_prob.cpp:39. Then
   at src/dwi/tractography/tracker/sd_prob.cpp:48, either the default value is
   added to the properties class if you haven't set it manually (so it appears
   in the .tck file header), or the default value is overridden.
   2. The -cutoff and -init_cutoff options are written to the
   Tractography::Properties class at cmd/streamtrack.cpp:440-444 (note that
   these are renamed to "threshold" and "init_threshold" within the Properties
   class). When the tracking threads are instantiated
   (cmd/streamtrack.cpp:229-251), regardless of the particular algorithm
   requested, all algorithms are derived from the Tracker::Base class
   (src/dwi/tractography/trackers/base.h). The constructor
   (src/dwi/tractography/tracker/base.cpp:50) sets the default threshold to
   0.1, over-writes it if a manual cutoff has been set, then sets the initial
   threshold to twice this value (unless a value has been provided manually,
   in which case that value is written to the Properties class).

Cheers
Rob

--

*Robert Smith*
Post-Doctoral Researcher, Imaging Division

The Florey Institute of Neuroscience and Mental Health
Melbourne Brain Centre - Austin Campus
245 Burgundy Street
Heidelberg Vic 3084
Ph: +61 3 9035 7128
Fax: +61 3 9035 7301
www.florey.edu.au


On Tue, Aug 27, 2013 at 5:23 PM, Jesse Ross-Jones <jesse.rj at gmail.com>wrote:

> Dear Mrtrix Devs,
>
> I was trying to find the default value for* trials (set the maximum
> number of sampling trials at each point (only used for probabilistic
> tracking). *) and for *initcuttof*. I began with reading the code in
> streamtrack.cpp and I see that there is a list of defaults
>
> Tractography::Properties properties;
>   properties["step_size"] = "0.2";
>   properties["max_dist"] = "200";
>   properties["min_dist"] = "10";
>   properties["threshold"] = "0.1";
>   properties["unidirectional"] = "0";
>   properties["stop_when_included"] = "0";
>   properties["no_mask_interp"] = "0";
>   properties["sh_precomputed"] = "1";
>
> Any values placed here will overwrite values from the previous section on
> options and will be replaced if the user provides an alternate value.
> However, when no value is given by the user and a default is not provided
> in the above list, the default is taken therefore from the options section?:
>
> Option ("cutoff", "cutoff threshold",
>       "set the FA or FOD amplitude cutoff for terminating tracks (default
> is 0.1).")
>     .append (Argument ("value", "value",
>           "the cutoff to use.").type_float (0, 1e6, 0.1)),
>
>   Option ("initcutoff", "intial cutoff threshold",
>       "set the minimum FA or FOD amplitude for initiating tracks "
>       "(default is twice the normal cutoff).")
>     .append (Argument ("value", "value",
>           "the initial cutoff to use.").type_float (0, 1e6, 0.1)),
>
> Option ("trials", "number of trials",
>     "set the maximum number of sampling trials at each point "
>     "(only used for probabilistic tracking).")
>     .append (Argument ("number", "number", "the number of
> trials.").type_integer(1, 10000, 50)),
>
> If these values are overwritten however, I am wondering when does the
> initcutoff value get set to twice the cutoff value? (The original default i
> see is 0.1 which is the same value for cutoff) Does this occur in another
> file? *-initcutoff *(set the minimum FA or FOD amplitude for initiating
> tracks* (default is twice the normal cutoff))
>
> *
> So my questions are these:
>
>    1. Is the default value for trials when none is given by the user 50?
>    2. When does initcutoff get set to twice the normal cutoff?
>
> Many thanks
>
> Jesse
>
> _______________________________________________
> Mrtrix-discussion mailing list
> Mrtrix-discussion at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20130828/9c21d12c/attachment.html


More information about the Mrtrix-discussion mailing list