Skip to content
Snippets Groups Projects
Commit 0871bd54 authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

*** empty log message ***

parent 3b80e93c
No related branches found
No related tags found
No related merge requests found
...@@ -249,7 +249,7 @@ proc fdt:dialog { w tclstartupfile } { ...@@ -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.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 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" 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 " scrollbar $w.data.seed.sb -command "$w.data.seed.targets yview "
frame $w.data.seed.tb frame $w.data.seed.tb
...@@ -302,7 +302,7 @@ proc fdt:dialog { w tclstartupfile } { ...@@ -302,7 +302,7 @@ proc fdt:dialog { w tclstartupfile } {
frame $w.data.targets.wf 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" 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" 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 " scrollbar $w.data.targets.wf.tf.sb -command "$w.data.targets.wf.tf.targets yview "
frame $w.data.targets.wf.tf.tb frame $w.data.targets.wf.tf.tb
...@@ -330,7 +330,7 @@ proc fdt:dialog { w tclstartupfile } { ...@@ -330,7 +330,7 @@ proc fdt:dialog { w tclstartupfile } {
frame $w.data.targets.cf 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" 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" 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 " scrollbar $w.data.targets.cf.tf.sb -command "$w.data.targets.cf.tf.targets yview "
frame $w.data.targets.cf.tf.tb frame $w.data.targets.cf.tf.tb
......
...@@ -42,9 +42,9 @@ probtrackOptions* probtrackOptions::gopt = NULL; ...@@ -42,9 +42,9 @@ probtrackOptions* probtrackOptions::gopt = NULL;
modecheck(); // check all the correct options are set for this mode. modecheck(); // check all the correct options are set for this mode.
if(mode.value()!="simple"){ if(mode.value()!="simple"){
if(forcedir.value()) if(forcedir.value())
logger.setthenmakeDir(logdir.value(),"probtrack.log"); logger.setthenmakeDir(logdir.value(),"probtrackx.log");
else else
logger.makeDir(logdir.value(),"probtrack.log"); logger.makeDir(logdir.value(),"probtrackx.log");
cout << "Log directory is: " << logger.getDir() << endl; cout << "Log directory is: " << logger.getDir() << endl;
...@@ -60,7 +60,7 @@ probtrackOptions* probtrackOptions::gopt = NULL; ...@@ -60,7 +60,7 @@ probtrackOptions* probtrackOptions::gopt = NULL;
} }
catch(X_OptionError& e){ catch(X_OptionError& e){
cerr<<e.what()<<endl; cerr<<e.what()<<endl;
cerr<<"try: probtrack --help"<<endl; cerr<<"try: probtrackx --help"<<endl;
exit(0); exit(0);
} }
......
...@@ -630,11 +630,12 @@ namespace TRACT{ ...@@ -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.. 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()){ if(opts.randfib.value()){
float tmp=rand()/RAND_MAX; float tmp=rand()/RAND_MAX * float(m_stline.nfibres()-1);
if(tmp>0.5) fibst = (int)round(tmp);
fibst=0; //if(tmp>0.5)
else //fibst=0;
fibst=1;// fix this for > 2 fibres //else
//fibst=1;// fix this for > 2 fibres
} }
int nlines=0; int nlines=0;
......
...@@ -68,7 +68,8 @@ namespace TRACT{ ...@@ -68,7 +68,8 @@ namespace TRACT{
for(unsigned int i=0;i<m_waymasks.size();i++) for(unsigned int i=0;i<m_waymasks.size();i++)
pop_waymasks(); 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_x_seed() const {return m_x_s_init;}
inline const float get_y_seed() const {return m_y_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;} inline const float get_z_seed() const {return m_z_s_init;}
......
...@@ -32,6 +32,7 @@ namespace TRACTVOLSX{ ...@@ -32,6 +32,7 @@ namespace TRACTVOLSX{
bool init_sample; bool init_sample;
int fibst; int fibst;
bool usef; bool usef;
public: public:
//constructors:: //constructors::
Tractvolsx(const bool& usefin=false):opts(probtrackxOptions::getInstance()),init_sample(true),fibst(1),usef(usefin){} Tractvolsx(const bool& usefin=false):opts(probtrackxOptions::getInstance()),init_sample(true),fibst(1),usef(usefin){}
...@@ -44,7 +45,7 @@ namespace TRACTVOLSX{ ...@@ -44,7 +45,7 @@ namespace TRACTVOLSX{
for(unsigned int m=0;m<fsamples.size();m++) for(unsigned int m=0;m<fsamples.size();m++)
delete fsamples[m]; delete fsamples[m];
} }
inline int nfibres()const{return (int)thsamples.size();}
void reset(const int& fibst_in){ void reset(const int& fibst_in){
init_sample=true; init_sample=true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment