From 6a9ea68419d13b464aaced50661350822838ed87 Mon Sep 17 00:00:00 2001
From: Stephen Smith <steve@fmrib.ox.ac.uk>
Date: Tue, 21 Feb 2006 08:06:31 +0000
Subject: [PATCH]  CVS:
 ----------------------------------------------------------------------

---
 siena_diff.cc | 50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/siena_diff.cc b/siena_diff.cc
index d37f9db..3ff2bf8 100644
--- a/siena_diff.cc
+++ b/siena_diff.cc
@@ -26,12 +26,12 @@ using namespace NEWIMAGE;
 void usage()
 {
   cout << "\nUsage: siena_diff <input1_basename> <input2_basename> [options] [-s segmentation options]\n\n" <<
-    "[-d]        debug - generate edge images and don't remove temporary images\n" <<
-    "[-2]        don't segment grey+white separately (because there is poor grey-white contrast)\n" <<
-    "[-c <corr>] apply self-calibrating correction factor\n" <<
+    "[-d]            debug - generate edge images and don't remove temporary images\n" <<
+    "[-2]            don't segment grey+white separately (because there is poor grey-white contrast)\n" <<
+    "[-c <corr>]     apply self-calibrating correction factor\n" <<
     //    "[-e]        erode joint mask a lot instead of dilating it slightly (ie find ventricle surface)\n" <<
-    "[-i]        ignore flow in z (may be good if top of brain is missing)\n" <<
-    "[-m]        apply <input1_basename>_stdmask to brain edge points\n" <<
+    "[-i]            ignore flow in z (may be good if top of brain is missing)\n" <<
+    "[-m]            apply <input1_basename>_stdmask to brain edge points\n" <<
     "[-s <options>]  <options> to be passed to segmentation (type \"fast\" to get these)\n\n" << endl;
   exit(1);
 }
@@ -149,28 +149,28 @@ for (i = 3; i < argc; i++) {
 // }}}
   // {{{  transform images and masks
 
-// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
-// 	fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
-// printf("%s\n",thestring); system(thestring);
+sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
+	fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
+printf("%s\n",thestring); system(thestring);
 
-// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
-// 	fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
-// printf("%s\n",thestring); system(thestring);
+sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
+	fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
+printf("%s\n",thestring); system(thestring);
 
-// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
-// 	fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
-// printf("%s\n",thestring); system(thestring);
+sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
+	fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
+printf("%s\n",thestring); system(thestring);
 
-// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
-// 	fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
-// printf("%s\n",thestring); system(thestring);
+sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
+	fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
+printf("%s\n",thestring); system(thestring);
 
-// if (edge_masking)
-// {
-//   sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_valid_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_valid_mask_with_%s",
-// 	  fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
-//   printf("%s\n",thestring); system(thestring);
-// }
+if (edge_masking)
+{
+  sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_valid_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_valid_mask_with_%s",
+	  fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
+  printf("%s\n",thestring); system(thestring);
+}
 
 // }}}
   // {{{  dilate masks, read transformed images and masks, and combine to jointly-masked transformed images
@@ -230,7 +230,7 @@ if(1) // always done unless the above uncommented and used instead of this test
     sprintf(thestring,"%s/bin/fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
 	    fsldir,segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
     cout << thestring << endl;
-    //    system(thestring);
+    system(thestring);
   }
  else
    {
@@ -482,7 +482,7 @@ if (flow_output)
 cout << "AREA  " << count*voxel_area << " mm^2" << endl;
 cout << "VOLC  " << total*voxel_volume << " mm^3" << endl;
 cout << "RATIO " << (total*voxel_volume) / (count*voxel_area) << " mm" << endl;    /* mean perpendicular edge motion; l in the equations */
-cout << "PBVC  " << (calib*30*total*voxel_volume) / (count*voxel_area) << " %%" << endl;
+cout << "PBVC  " << (calib*30*total*voxel_volume) / (count*voxel_area) << " %" << endl;
 
 // }}}
   return 0;
-- 
GitLab