diff --git a/probtrackx.cc b/probtrackx.cc index 758d2a7ce4e307a030688a7c0adfed53c3874aea..e330d11f266173f8c35522292bb86aa40927de49 100644 --- a/probtrackx.cc +++ b/probtrackx.cc @@ -29,6 +29,7 @@ int main ( int argc, char **argv ){ srand(opts.rseed.value()); + if(opts.verbose.value()>0){ opts.status(); } diff --git a/probtrackxOptions.cc b/probtrackxOptions.cc index 1711c74c9156f5803f06367881aa8415ba794fdc..024024b555a4d69477af6eb4b2590c8a2ca93437 100644 --- a/probtrackxOptions.cc +++ b/probtrackxOptions.cc @@ -197,7 +197,9 @@ probtrackxOptions* probtrackxOptions::gopt = NULL; cout<<"nsteps "<<nsteps.value()<<endl; cout<<"usef "<<usef.value()<<endl; cout<<"rseed "<<rseed.value()<<endl; - } + cout<<"randfib "<<randfib.value()<<endl; + cout<<"fibst "<<fibst.value()<<endl; +} } diff --git a/probtrackxOptions.h b/probtrackxOptions.h index 24f39b38d27929c7b9289c35b57120ebb7dfed0b..eefa5e697dcaba73588be2183dd1dc67be185c86 100644 --- a/probtrackxOptions.h +++ b/probtrackxOptions.h @@ -214,7 +214,7 @@ class probtrackxOptions { false, no_argument), randfib(string("--randfib"), 0, string("Default 0. Set to 1 to randomly sample initial fibres (with f > fibthresh). \n Set to 2 to sample in proportion fibres (with f>fibthresh) to f. \n Set to 3 to sample ALL populations at random (even if f<fibthresh)"), - false, no_argument), + false, requires_argument), fibst(string("--fibst"),1, string("Force a starting fibre for tracking - default=1, i.e. first fibre orientation. Only works if randfib==0"), false, requires_argument), diff --git a/streamlines.cc b/streamlines.cc index 83e2a867f8fe186cf6c5fd8265dde68db72e3eb5..66490133304515a6fcdf75903a6b579b586d366c 100644 --- a/streamlines.cc +++ b/streamlines.cc @@ -1080,7 +1080,7 @@ void Counter::save_matrix3(){ cout <<x<<" "<<y<<" "<<z<<endl; if(opts.fibst.set()){ fibst=opts.fibst.value()-1; - OUT(fibst); + } else{ if(fibst == -1){ @@ -1098,7 +1098,7 @@ void Counter::save_matrix3(){ int nlines=0; for(int p=0;p<opts.nparticles.value();p++){ - + if(opts.randfib.value()>2){ //This bit of code just does random sampling from all fibre populations - even those whose f value is less than f-thresh. //3 other possibilities - randfib==0 -> use fibst (default first fibre but can be set) diff --git a/tractvolsx.h b/tractvolsx.h index f1206e5afdb74275f414451cb97ea7bbfd2943e5..57fec0adfae2a8b2c378b463efd74e6e651c01cd 100644 --- a/tractvolsx.h +++ b/tractvolsx.h @@ -153,7 +153,6 @@ namespace TRACTVOLSX{ float dotmax=0,dottmp=0; int fibind=0; if(thsamples.size()>1){//more than 1 fibre - if(init_sample){//go for the specified fibre on the first jump or generate at random if(opts.randfib.value()==1){//this generates startfib at random (except for fibres where f<fibthresh) vector<int> fibvec; @@ -171,6 +170,7 @@ namespace TRACTVOLSX{ float rtmp=rand()/float(RAND_MAX) * float(fibvec.size()-1); fibst = fibvec[ (int)round(rtmp) ]; } + } else if(opts.randfib.value()==2){ //this generates startfib with probability proportional to f (except for fibres where f<fibthresh). //this chooses at random but in proportion to fsamples.