From dd8d829a91dd675a011549c6115237c7c43b1326 Mon Sep 17 00:00:00 2001
From: Saad Jbabdi <saad@fmrib.ox.ac.uk>
Date: Mon, 6 Aug 2007 20:12:10 +0000
Subject: [PATCH] small modifs

---
 fdt.tcl             | 22 ++++++++++++----------
 probtrackOptions.cc |  6 +++---
 probtrackxOptions.h |  2 +-
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/fdt.tcl b/fdt.tcl
index 3b12703..b1703f4 100644
--- a/fdt.tcl
+++ b/fdt.tcl
@@ -688,7 +688,7 @@ proc fdt:apply { w dialog } {
 		exec mkdir -p $probtrack(output)
        	    }
 
-	    set filebase $probtrack(output)/fdtx
+	    set filebase $probtrack(output)/fdt
 	    set logfile "${filebase}_log.tcl"
 	    set log [open "$logfile" w]
 	    puts $log "set tool $probtrack(tool)"
@@ -738,15 +738,17 @@ proc fdt:apply { w dialog } {
                     set flags "--mode=simple --seedref=$probtrack(reference) -o $probtrack(output) -x ${filebase}_coordinates.txt $flags"
 	       } 
                seedmask {
-		     if { $probtrack(bcyn) } { 
-			 fdt_monitor_short $w "${FSLDIR}/bin/convert_xfm -omat $probtrack(output)/tmp_xfm_mat -inverse $probtrack(xfm)"
-			 fdt_monitor_short $w "${FSLDIR}/bin/flirt -in $probtrack(bedpost_dir)/nodif_brain_mask -ref $probtrack(reference) -applyxfm -init $probtrack(output)/tmp_xfm_mat -out $probtrack(output)/tmp_brain_mask"
-			 fdt_monitor_short $w "${FSLDIR}/bin/flirt -in $probtrack(output)/tmp_brain_mask -ref $probtrack(output)/tmp_brain_mask -applyisoxfm $probtrack(scale) -out $probtrack(output)/lowresmask"
-			 fdt_monitor_short $w "${FSLDIR}/bin/fslmaths  $probtrack(output)/lowresmask -thr 0.5 -bin  $probtrack(output)/lowresmask"
-                       set flags "$flags --lrmask=$probtrack(output)/lowresmask --omatrix2" 
-			 fdt_monitor_short $w "${FSLDIR}/bin/imrm $probtrack(output)/tmp_brain_mask"
-			 fdt_monitor_short $w "/bin/rm $probtrack(output)/tmp_xfm_mat"
-                   }
+		   if { [ file exists /usr/local/fsl/bin/reord_OM ] } {
+		       if { $probtrack(bcyn) } { 
+			   fdt_monitor_short $w "${FSLDIR}/bin/convert_xfm -omat $probtrack(output)/tmp_xfm_mat -inverse $probtrack(xfm)"
+			   fdt_monitor_short $w "${FSLDIR}/bin/flirt -in $probtrack(bedpost_dir)/nodif_brain_mask -ref $probtrack(reference) -applyxfm -init $probtrack(output)/tmp_xfm_mat -out $probtrack(output)/tmp_brain_mask"
+			   fdt_monitor_short $w "${FSLDIR}/bin/flirt -in $probtrack(output)/tmp_brain_mask -ref $probtrack(output)/tmp_brain_mask -applyisoxfm $probtrack(scale) -out $probtrack(output)/lowresmask"
+			   fdt_monitor_short $w "${FSLDIR}/bin/fslmaths  $probtrack(output)/lowresmask -thr 0.5 -bin  $probtrack(output)/lowresmask"
+			   set flags "$flags --lrmask=$probtrack(output)/lowresmask --omatrix2" 
+			   fdt_monitor_short $w "${FSLDIR}/bin/imrm $probtrack(output)/tmp_brain_mask"
+			   fdt_monitor_short $w "/bin/rm $probtrack(output)/tmp_xfm_mat"
+		       }
+		   }
                    set flags "--mode=seedmask -x $probtrack(reference) $flags"  
 	       }
 	       network {
diff --git a/probtrackOptions.cc b/probtrackOptions.cc
index 784ddff..abc642e 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(),"probtrackx.log");
+	    logger.setthenmakeDir(logdir.value(),"probtrack.log");
 	  else
-	    logger.makeDir(logdir.value(),"probtrackx.log");
+	    logger.makeDir(logdir.value(),"probtrack.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: probtrackx --help"<<endl;
+      cerr<<"try: probtrack --help"<<endl;
       exit(0);
     }
     
diff --git a/probtrackxOptions.h b/probtrackxOptions.h
index f7e6ae9..92a89a0 100644
--- a/probtrackxOptions.h
+++ b/probtrackxOptions.h
@@ -187,7 +187,7 @@ class probtrackxOptions {
 	 string("Use anisotropy to constrain tracking"), 
 	 false, no_argument),
   randfib(string("--randfib"), false, 
-	 string("Select randomly from the first two fibres when seeding"), 
+	 string("Select randomly from one of the fibres"), 
 	 false, no_argument),
   modeuler(string("--modeuler"), false, 
 	   string("Use modified euler streamlining"), 
-- 
GitLab