diff --git a/fdt.tcl b/fdt.tcl index 50a898850a5aa434b4b27f008d1d4be7a5699892..60a511fb5c37656292f9e094a03d7474b83d1c98 100644 --- a/fdt.tcl +++ b/fdt.tcl @@ -249,7 +249,7 @@ proc fdt:dialog { w tclstartupfile } { pack $w.data.seed.voxel $w.data.seed.ssf -in $w.data.seed.f -side bottom -anchor w -pady 2 pack $w.data.seed.menu $w.data.seed.reference -in $w.data.seed.f -side left -anchor w -pady 2 - TitleFrame $w.data.seed.target -text "Multiple Masks" + TitleFrame $w.data.seed.target -text "Masks list" listbox $w.data.seed.targets -height 6 -width 50 -yscrollcommand "$w.data.seed.sb set" scrollbar $w.data.seed.sb -command "$w.data.seed.targets yview " frame $w.data.seed.tb @@ -302,7 +302,7 @@ proc fdt:dialog { w tclstartupfile } { frame $w.data.targets.wf checkbutton $w.data.targets.wf.sct -text "Waypoints masks" -variable probtrack(waypoint_yn) -command " pack forget $w.data.targets.wf.tf ; if { \$probtrack(waypoint_yn) } { pack $w.data.targets.wf.tf } ; $w.probtrack compute_size" - TitleFrame $w.data.targets.wf.tf -text "Waypoints" + TitleFrame $w.data.targets.wf.tf -text "Waypoints list" listbox $w.data.targets.wf.tf.targets -height 6 -width 50 -yscrollcommand "$w.data.targets.wf.tf.sb set" scrollbar $w.data.targets.wf.tf.sb -command "$w.data.targets.wf.tf.targets yview " frame $w.data.targets.wf.tf.tb @@ -330,7 +330,7 @@ proc fdt:dialog { w tclstartupfile } { frame $w.data.targets.cf checkbutton $w.data.targets.cf.sct -text "Classification targets" -variable probtrack(classify_yn) -command " pack forget $w.data.targets.cf.tf ; if { \$probtrack(classify_yn) } { pack $w.data.targets.cf.tf } ; $w.probtrack compute_size" - TitleFrame $w.data.targets.cf.tf -text "Classification" + TitleFrame $w.data.targets.cf.tf -text "Targets list" listbox $w.data.targets.cf.tf.targets -height 6 -width 50 -yscrollcommand "$w.data.targets.cf.tf.sb set" scrollbar $w.data.targets.cf.tf.sb -command "$w.data.targets.cf.tf.targets yview " frame $w.data.targets.cf.tf.tb diff --git a/probtrackOptions.cc b/probtrackOptions.cc index abc642e8cbeb3ae336078bec070d1d49c3b15189..784ddff4b197ccaa8fc3e1335118ea0e807af5bc 100644 --- a/probtrackOptions.cc +++ b/probtrackOptions.cc @@ -42,9 +42,9 @@ probtrackOptions* probtrackOptions::gopt = NULL; modecheck(); // check all the correct options are set for this mode. if(mode.value()!="simple"){ if(forcedir.value()) - logger.setthenmakeDir(logdir.value(),"probtrack.log"); + logger.setthenmakeDir(logdir.value(),"probtrackx.log"); else - logger.makeDir(logdir.value(),"probtrack.log"); + logger.makeDir(logdir.value(),"probtrackx.log"); cout << "Log directory is: " << logger.getDir() << endl; @@ -60,7 +60,7 @@ probtrackOptions* probtrackOptions::gopt = NULL; } catch(X_OptionError& e){ cerr<<e.what()<<endl; - cerr<<"try: probtrack --help"<<endl; + cerr<<"try: probtrackx --help"<<endl; exit(0); } diff --git a/streamlines.cc b/streamlines.cc index 9ea0835bf2ad33fa92d0b081ea67509caf748e65..b9253373132710c6905efe47ca3e9c0b8508d687 100644 --- a/streamlines.cc +++ b/streamlines.cc @@ -630,11 +630,12 @@ namespace TRACT{ fibst=m_seeds(int(round(x)),int(round(y)),int(round(z)))-1;//fibre to start with is taken from seed volume.. } if(opts.randfib.value()){ - float tmp=rand()/RAND_MAX; - if(tmp>0.5) - fibst=0; - else - fibst=1;// fix this for > 2 fibres + float tmp=rand()/RAND_MAX * float(m_stline.nfibres()-1); + fibst = (int)round(tmp); + //if(tmp>0.5) + //fibst=0; + //else + //fibst=1;// fix this for > 2 fibres } int nlines=0; diff --git a/streamlines.h b/streamlines.h index 050937f4d423a2c838dc36f934f378f0cb6d6a8c..1fef0a56c396ef066b9d8a0e671562902e942bf3 100644 --- a/streamlines.h +++ b/streamlines.h @@ -68,7 +68,8 @@ namespace TRACT{ for(unsigned int i=0;i<m_waymasks.size();i++) pop_waymasks(); } - + + inline int nfibres() const {return vols.nfibres();} inline const float get_x_seed() const {return m_x_s_init;} inline const float get_y_seed() const {return m_y_s_init;} inline const float get_z_seed() const {return m_z_s_init;} diff --git a/tractvolsx.h b/tractvolsx.h index 8ea1ed5d910505915b46a91405eba6a1686a77cd..5ca4dcb4beea9f807ee24c0194daa8ca16115834 100644 --- a/tractvolsx.h +++ b/tractvolsx.h @@ -32,6 +32,7 @@ namespace TRACTVOLSX{ bool init_sample; int fibst; bool usef; + public: //constructors:: Tractvolsx(const bool& usefin=false):opts(probtrackxOptions::getInstance()),init_sample(true),fibst(1),usef(usefin){} @@ -44,7 +45,7 @@ namespace TRACTVOLSX{ for(unsigned int m=0;m<fsamples.size();m++) delete fsamples[m]; } - + inline int nfibres()const{return (int)thsamples.size();} void reset(const int& fibst_in){ init_sample=true;