diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-28 16:07:32 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-28 16:07:32 +0000 |
commit | 85b8978beedd0142560573a92442a5ed907b0ed2 (patch) | |
tree | a5fb149aa94b540a568ac6c7b2831a8065e53959 /src/mapping.c | |
parent | 49ad910255546917c22a1d0ef01b4109c7772b16 (diff) |
Be a lot more clear about which things are properties of images and which
belong to the control context.
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@81 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/mapping.c')
-rw-r--r-- | src/mapping.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mapping.c b/src/mapping.c index d9ca94d..24a6470 100644 --- a/src/mapping.c +++ b/src/mapping.c @@ -27,11 +27,14 @@ ReflectionContext *mapping_create(ControlContext *ctx) { int twidth, theight; int x, y, i; int16_t *image_total; + double x_centre = 0; + double y_centre = 0; /* Create reflection context */ rctx = reflection_init(); if ( !ctx->prealign ) { + /* Find centre of image stack * Determine maximum size of image to accommodate, and allocate memory */ twidth = 0; theight = 0; @@ -64,13 +67,13 @@ ReflectionContext *mapping_create(ControlContext *ctx) { } } } - ctx->x_centre = max_x; - ctx->y_centre = max_y; - + x_centre = max_x; + y_centre = max_y; + /* Display */ sum_id = imagedisplay_open(image_total, twidth, theight, "Sum of All Images"); - imagedisplay_mark_point(sum_id, ctx->x_centre, ctx->y_centre); - imagedisplay_add_tilt_axis(sum_id, ctx, ctx->omega); + imagedisplay_mark_point(sum_id, x_centre, y_centre); + imagedisplay_add_tilt_axis(sum_id, x_centre, y_centre, ctx->omega); } @@ -79,10 +82,10 @@ ReflectionContext *mapping_create(ControlContext *ctx) { ctx->reflectionctx = rctx; for ( i=0; i<ctx->n_images; i++ ) { if ( !ctx->prealign ) { - ctx->images[i].x_centre = ctx->x_centre; - ctx->images[i].y_centre = ctx->y_centre; + ctx->images[i].x_centre = x_centre; + ctx->images[i].y_centre = y_centre; } - itrans_process_image(ctx->images[i].image, ctx, ctx->images[i].tilt); + itrans_process_image(ctx->images[i], ctx); } return rctx; |