diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 17:41:06 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 17:41:06 +0000 |
commit | 9852df6e6d82a75d52b7269ceeebeca7ee02ead3 (patch) | |
tree | 08b76e19834f2131bd997ed2dfc40f910881f9d8 /src/control.c | |
parent | 57645119798cd7db0d64807d8b617e13ac5e65c8 (diff) |
Give image centres in qdrp.rc if desired
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@90 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/control.c')
-rw-r--r-- | src/control.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/control.c b/src/control.c index c79ca17..ac3de0b 100644 --- a/src/control.c +++ b/src/control.c @@ -10,6 +10,7 @@ */ #include <inttypes.h> +#include <stdlib.h> #include "control.h" @@ -22,6 +23,8 @@ int control_add_image(ControlContext *ctx, uint16_t *image, int width, int heigh ctx->images[ctx->n_images].height = height; ctx->images[ctx->n_images].lambda = ctx->lambda; ctx->images[ctx->n_images].fmode = ctx->fmode; + ctx->images[ctx->n_images].x_centre = ctx->x_centre; + ctx->images[ctx->n_images].y_centre = ctx->y_centre; if ( ctx->fmode == FORMULATION_PIXELSIZE ) { ctx->images[ctx->n_images].pixel_size = ctx->pixel_size; @@ -39,3 +42,17 @@ int control_add_image(ControlContext *ctx, uint16_t *image, int width, int heigh } +ControlContext *control_ctx_new() { + + ControlContext *ctx; + + ctx = malloc(sizeof(ControlContext)); + + ctx->x_centre = 0; + ctx->y_centre = 0; + ctx->have_centres = 0; + + return ctx; + +} + |