From 31f82f0ddf5b4cb6085c45e071f130528cc4c9da Mon Sep 17 00:00:00 2001
From: Mark Jenkinson <mark@fmrib.ox.ac.uk>
Date: Mon, 10 Apr 2006 16:50:29 +0000
Subject: [PATCH] Added Saad changes back in

---
 miscmaths.cc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/miscmaths.cc b/miscmaths.cc
index 92d5804..7b8cb63 100644
--- a/miscmaths.cc
+++ b/miscmaths.cc
@@ -1497,6 +1497,24 @@ ReturnMatrix geqt(const Matrix& mat1,const Matrix& mat2)
   res.Release();
   return res;
 }
+ReturnMatrix geqt(const Matrix& mat,const float a) 
+{
+  int ncols = mat.Ncols();
+  int nrows = mat.Nrows();
+  Matrix res(nrows,ncols);
+  res=0.0;
+
+  for (int ctr1 = 1; ctr1 <= nrows; ctr1++) {
+    for (int ctr2 =1; ctr2 <= ncols; ctr2++) {
+      if( mat(ctr1,ctr2) >= a){
+	res(ctr1,ctr2) = 1.0;
+      }
+    }
+  }
+
+  res.Release();
+  return res;
+}
 
 
 ReturnMatrix leqt(const Matrix& mat1,const Matrix& mat2) 
-- 
GitLab