From 7392e248f2bd645aaeb02b0990bb1025fa7211e0 Mon Sep 17 00:00:00 2001
From: Stephen Smith <steve@fmrib.ox.ac.uk>
Date: Thu, 16 Nov 2000 19:54:52 +0000
Subject: [PATCH] *** empty log message ***

---
 cluster.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cluster.cc b/cluster.cc
index cbbdb8e..08f27db 100644
--- a/cluster.cc
+++ b/cluster.cc
@@ -16,7 +16,7 @@
 
 using namespace NEWIMAGE;
 using std::vector;
-
+using namespace Opts;
 
 string title="cluster (Version 1.0)\nCopyright(c) 2000, University of Oxford (Mark Jenkinson)";
 string examples="cluster --in <filename> --thresh <value> [options]";
@@ -120,7 +120,7 @@ template <class S>
 void vox2mmcoord(vector<triple<float> >& coords, 
 				   const volume<S>& vol)
 {
-  float vx = vol.xdim(), vy = vol.ydim(), vz = vol.zdim();
+  float vx = vol.xdim()*vol.xsign(), vy = vol.ydim()*vol.ysign(), vz = vol.zdim()*vol.zsign();
   vox2mmcoord(coords,vx,vy,vz);
 }
 
@@ -133,7 +133,7 @@ void addoriginoffset(vector<triple<T> >& coords, const volume<S>& vol)
   if (orig.SumAbsoluteValue() < 0.1)  return;  // zero origin -> no work
   for (unsigned int n=0; n<coords.size(); n++) {
     coords[n].x -= (T) (orig(1) - 1.0);   // -1.0 convert from SPM convention
-    coords[n].y -= (T) (orig(2) - 1.0);   // -1.0 convert from SPM convention
+    coords[n].y -= (T) (orig(2) - 2.0);   // -2.0 convert from SPM convention (NFI)
     coords[n].z -= (T) (orig(3) - 1.0);   // -1.0 convert from SPM convention
   }
 }
@@ -415,7 +415,7 @@ int fmrib_main(int argc, char *argv[])
     //   and maintains the same values otherwise
     volume<T> lcopy;
     relabel_image(labelim,lcopy,threshidx);
-    lcopy.threshold(0.5);
+    lcopy.threshold(1);
     save_volume(zvol * lcopy,outthresh.value());
   }
 
-- 
GitLab