diff options
Diffstat (limited to 'src/itrans-threshold.c')
-rw-r--r-- | src/itrans-threshold.c | 20 |
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++; |