diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 16:51:54 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 16:51:54 +0000 |
commit | 57645119798cd7db0d64807d8b617e13ac5e65c8 (patch) | |
tree | 4b5bf9dec98460f9e761a0f171427cd14f5f9f8f /src/main.c | |
parent | 5008d9a881f2ec07f12160025742786f73fa95ba (diff) |
Pre-alignment procedure
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@89 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -33,9 +33,12 @@ #include "mapping.h" #include "prealign.h" -static void main_do_reconstruction(ControlContext *ctx, int val) { +void main_do_reconstruction(ControlContext *ctx) { + int val = 0; + if ( ctx->inputfiletype != INPUT_CACHE ) { + prealign_sum_stack(ctx); mapping_create(ctx); } @@ -43,7 +46,7 @@ static void main_do_reconstruction(ControlContext *ctx, int val) { cache_save(ctx->filename, ctx->reflectionctx); } - if ( !val && (ctx->rmode == RECONSTRUCTION_PREDICTION) && (ctx->reflectionctx) ) { + if ( (ctx->rmode == RECONSTRUCTION_PREDICTION) && (ctx->reflectionctx) ) { val = ipr_refine(ctx); } @@ -102,10 +105,15 @@ static gint main_method_window_response(GtkWidget *method_window, gint response, val=0; } + if ( val ) { + fprintf(stderr, "Reconstruction failed.\n"); + gtk_exit(0); + } + if ( ctx->prealign ) { prealign_do_series(ctx); } else { - main_do_reconstruction(ctx, val); + main_do_reconstruction(ctx); } } else { |