Hi Jesse,<div><br></div><div>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.</div>
<div><br></div><div>The references I'm providing here are from the most up-to-date code in the <a href="https://code.google.com/p/mrtrix/">SVN repository</a>. 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.</div>
<div><ol><li>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.</li>
<li>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).</li>
</ol>Cheers</div><div>Rob</div><div><div><br>--<br><br><span style="color:rgb(255,102,0)"><b>Robert Smith</b><br>Post-Doctoral Researcher, Imaging Division</span><br><br>The Florey Institute of Neuroscience and Mental Health<br>
Melbourne Brain Centre - Austin Campus<br>245 Burgundy Street<br>Heidelberg Vic 3084<br>Ph: +61 3 9035 7128<br>Fax: +61 3 9035 7301<br><a href="http://www.florey.edu.au" target="_blank">www.florey.edu.au</a><br><span style="font-size:9pt;font-family:"Times New Roman","serif";color:red"></span></div>
<br><br><div class="gmail_quote">On Tue, Aug 27, 2013 at 5:23 PM, Jesse Ross-Jones <span dir="ltr"><<a href="mailto:jesse.rj@gmail.com" target="_blank">jesse.rj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Dear Mrtrix Devs,<br><br></div>I was trying to find the default value for<b> trials (<span style="font-size:11pt;line-height:120%;font-family:"Arial","sans-serif";color:rgb(38,38,38)" lang="EN-GB">set
the maximum number of sampling trials at each point (only used for
probabilistic tracking). </span></b>) and for <b>initcuttof</b>. I began with reading the code in streamtrack.cpp and I see that there is a list of defaults <br><br>Tractography::Properties properties;<br> properties["step_size"] = "0.2";<br>
properties["max_dist"] = "200";<br> properties["min_dist"] = "10";<br> properties["threshold"] = "0.1";<br> properties["unidirectional"] = "0";<br>
properties["stop_when_included"] = "0";<br> properties["no_mask_interp"] = "0";<br> properties["sh_precomputed"] = "1";<br><br>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?:<br>
<br>Option ("cutoff", "cutoff threshold",<br> "set the FA or FOD amplitude cutoff for terminating tracks (default is 0.1).")<br> .append (Argument ("value", "value",<br>
"the cutoff to use.").type_float (0, 1e6, 0.1)),<br><br> Option ("initcutoff", "intial cutoff threshold",<br> "set the minimum FA or FOD amplitude for initiating tracks "<br>
"(default is twice the normal cutoff).")<br> .append (Argument ("value", "value",<br> "the initial cutoff to use.").type_float (0, 1e6, 0.1)),<br><br>Option ("trials", "number of trials",<br>
"set the maximum number of sampling trials at each point "<br> "(only used for probabilistic tracking).")<br> .append (Argument ("number", "number", "the number of trials.").type_integer(1, 10000, 50)),<br>
<br></div>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? <b>-initcutoff </b>(<span style="font-size:11pt;line-height:120%;font-family:"Arial","sans-serif";color:rgb(38,38,38)" lang="EN-GB">set
the minimum FA or FOD amplitude for initiating tracks</span><b><span style="font-size:11pt;line-height:120%;font-family:"Arial","sans-serif";color:rgb(38,38,38)" lang="EN-GB"> (default is twice the
normal cutoff))<br><br></span></b></div><span style="font-size:11pt;line-height:120%;font-family:"Arial","sans-serif";color:rgb(38,38,38)" lang="EN-GB">So my questions are these:<br></span><ol><li><span style="font-size:11pt;line-height:120%;font-family:"Arial","sans-serif";color:rgb(38,38,38)" lang="EN-GB">Is the default value for trials when none is given by the user 50? </span></li>
<li><span style="font-size:11pt;line-height:120%;font-family:"Arial","sans-serif";color:rgb(38,38,38)" lang="EN-GB">When does initcutoff get set to twice the normal cutoff?</span></li></ol><p>Many thanks <br>
<span class="HOEnZb"><font color="#888888">
</font></span></p><span class="HOEnZb"><font color="#888888"><p>Jesse<br></p></font></span></div>
<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>
<br></blockquote></div><br></div>