aboutsummaryrefslogtreecommitdiff
path: root/src/itrans-stat.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-07 23:47:45 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-07 23:47:45 +0000
commit32b90c31701987b47000e398c8b534553004a4a2 (patch)
tree50429ae105593c9b37e4c1ee4517b20985fe3bf2 /src/itrans-stat.c
parente3a59f0de58d873837252d4decdd8f727392fad7 (diff)
Tidying up
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@154 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/itrans-stat.c')
-rw-r--r--src/itrans-stat.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/itrans-stat.c b/src/itrans-stat.c
index 319e565..21cf415 100644
--- a/src/itrans-stat.c
+++ b/src/itrans-stat.c
@@ -22,6 +22,18 @@
#include "imagedisplay.h"
#include "utils.h"
+/* Renormalise a gsl_matrix to 0->1
+ * Re-written to use gsl_matrix native functions */
+static void matrix_renormalise(gsl_matrix *m) {
+
+ double max,min;
+
+ gsl_matrix_minmax(m,&min,&max);
+ gsl_matrix_add_constant(m,0.-min);
+ gsl_matrix_scale(m,1./(max-min));
+
+}
+
/*
* Create a gsl_matrix for performing image operations on
* from a raw image and control context