aboutsummaryrefslogtreecommitdiff
path: root/src/imagedisplay.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-24 20:44:53 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-24 20:44:53 +0000
commit21564ad003c7dd4d0a5699271b7a15a5e03b57ae (patch)
tree9f5c9f9f4c74be334f7e6b68f27313e344a288c9 /src/imagedisplay.c
parentd889de524b665bb82caa232b925044a36054464f (diff)
Ignore image border when surveying (makes prealigned summed stacks work)
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@175 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/imagedisplay.c')
-rw-r--r--src/imagedisplay.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/imagedisplay.c b/src/imagedisplay.c
index 26277a2..c2f2fbe 100644
--- a/src/imagedisplay.c
+++ b/src/imagedisplay.c
@@ -69,6 +69,7 @@ void imagedisplay_put_data(ImageDisplay *imagedisplay, ImageRecord imagerecord)
unsigned int w, h;
int min, max;
double c, scale;
+ int b;
h = imagerecord.height;
w = imagerecord.width;
@@ -78,8 +79,9 @@ void imagedisplay_put_data(ImageDisplay *imagedisplay, ImageRecord imagerecord)
}
min = 2<<15; max = 0;
- for ( y=0; y<h; y++ ) {
- for ( x=0; x<w; x++ ) {
+ b = (h+w)/20; /* Number of pixels of ignored border */
+ for ( y=b; y<h-b; y++ ) {
+ for ( x=b; x<w-b; x++ ) {
uint16_t val;
val = imagerecord.image[x+w*y];
if ( val > max ) max = val;