From 213f4c2096f0ed3cac5aee8b8afdbac061f946d1 Mon Sep 17 00:00:00 2001
From: Tim Behrens <behrens@fmrib.ox.ac.uk>
Date: Thu, 22 Oct 2009 11:01:02 +0000
Subject: [PATCH] refixed bug same bug fixes - now they are really fixed.

---
 probtrackx.cc        | 1 +
 probtrackxOptions.cc | 4 +++-
 probtrackxOptions.h  | 2 +-
 streamlines.cc       | 4 ++--
 tractvolsx.h         | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/probtrackx.cc b/probtrackx.cc
index 758d2a7..e330d11 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 1711c74..024024b 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 24f39b3..eefa5e6 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 83e2a86..6649013 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 f1206e5..57fec0a 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. 
-- 
GitLab