aboutsummaryrefslogtreecommitdiff
path: root/src/itrans-threshold.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-09-26 17:13:46 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-09-26 17:13:46 +0000
commitb419ab4428ff4fa0d58354abe6f2a953b9e236ee (patch)
treed9c6115485bdba34900717f6f2e7a66aaf487aa8 /src/itrans-threshold.c
parent4930a9088b8a13195a7038e9606e1a857fd6883f (diff)
Beginnings of a new initial basis choice (needs fixing)
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@131 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/itrans-threshold.c')
-rw-r--r--src/itrans-threshold.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/itrans-threshold.c b/src/itrans-threshold.c
index 519acc8..30e476c 100644
--- a/src/itrans-threshold.c
+++ b/src/itrans-threshold.c
@@ -20,16 +20,16 @@
#include "imagedisplay.h"
#include "reflections.h"
-unsigned int itrans_peaksearch_threshold(ImageRecord imagerecord, ControlContext *ctx) {
+unsigned int itrans_peaksearch_threshold(ImageRecord *imagerecord, ControlContext *ctx) {
int width, height;
int x, y;
unsigned int n_reflections = 0;
- uint16_t *image = imagerecord.image;
+ uint16_t *image = imagerecord->image;
uint16_t max = 0;
- width = imagerecord.width;
- height = imagerecord.height;
+ width = imagerecord->width;
+ height = imagerecord->height;
/* Simple Thresholding */
for ( y=0; y<height; y++ ) {
@@ -45,7 +45,7 @@ unsigned int itrans_peaksearch_threshold(ImageRecord imagerecord, ControlContext
assert(y<height);
assert(x>=0);
assert(y>=0);
- reflection_add_from_dp(ctx, (x-imagerecord.x_centre), (y-imagerecord.y_centre),
+ reflection_add_from_dp(ctx, (x-imagerecord->x_centre), (y-imagerecord->y_centre),
imagerecord, image[x + width*y]);
n_reflections++;
}
@@ -56,7 +56,7 @@ unsigned int itrans_peaksearch_threshold(ImageRecord imagerecord, ControlContext
}
-unsigned int itrans_peaksearch_adaptive_threshold(ImageRecord imagerecord, ControlContext *ctx) {
+unsigned int itrans_peaksearch_adaptive_threshold(ImageRecord *imagerecord, ControlContext *ctx) {
uint16_t max_val = 0;
int width, height;
@@ -65,9 +65,9 @@ unsigned int itrans_peaksearch_adaptive_threshold(ImageRecord imagerecord, Contr
uint16_t max;
int x, y;
- image = imagerecord.image;
- width = imagerecord.width;
- height = imagerecord.height;
+ image = imagerecord->image;
+ width = imagerecord->width;
+ height = imagerecord->height;
max = 0;
for ( y=0; y<height; y++ ) {
@@ -100,7 +100,7 @@ unsigned int itrans_peaksearch_adaptive_threshold(ImageRecord imagerecord, Contr
assert(max_y<height);
assert(max_x>=0);
assert(max_y>=0);
- reflection_add_from_dp(ctx, (max_x-imagerecord.x_centre), (max_y-imagerecord.y_centre),
+ reflection_add_from_dp(ctx, (max_x-imagerecord->x_centre), (max_y-imagerecord->y_centre),
imagerecord, image[x + width*y]);
n_reflections++;