aboutsummaryrefslogtreecommitdiff
path: root/src/control.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-03 14:01:12 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-03 14:01:12 +0000
commit585ca628920b5eba3f6addddabcec9ca90527f19 (patch)
treea1c4d5735ed59e2af08f238e2d827c822728145f /src/control.c
parent80828d43d4959122c549be8e44b26815bdb61519 (diff)
UI and reprojection stuff
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@144 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/control.c')
-rw-r--r--src/control.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/control.c b/src/control.c
index 80cf7ce..4e49de4 100644
--- a/src/control.c
+++ b/src/control.c
@@ -17,6 +17,12 @@
int control_add_image(ControlContext *ctx, uint16_t *image, int width, int height, double tilt) {
+ if ( ctx->images ) {
+ ctx->images = realloc(ctx->images, (ctx->n_images+1)*sizeof(ImageRecord));
+ } else {
+ ctx->images = malloc(sizeof(ImageRecord));
+ }
+
ctx->images[ctx->n_images].tilt = tilt;
ctx->images[ctx->n_images].omega = ctx->omega;
ctx->images[ctx->n_images].image = image;
@@ -55,6 +61,8 @@ ControlContext *control_ctx_new() {
ctx->have_centres = 0;
ctx->cell = NULL;
ctx->dirax = NULL;
+ ctx->n_images = 0;
+ ctx->images = NULL;
return ctx;