diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 13:52:59 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 13:52:59 +0000 |
commit | 28fe29530075a28f6ac7a2f86628a00c7cb69af9 (patch) | |
tree | 3e3d79799930f1cd502a969a24c889ac8110262c /src/main.c | |
parent | 3bd37169d751c7b5f0b36847ea902735d9234e63 (diff) |
Revamp ImageDisplay
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@86 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 42 |
1 files changed, 24 insertions, 18 deletions
@@ -33,6 +33,29 @@ #include "mapping.h" #include "prealign.h" +static void main_do_reconstruction(ControlContext *ctx, int val) { + + if ( ctx->inputfiletype != INPUT_CACHE ) { + mapping_create(ctx); + } + + if ( (ctx->inputfiletype != INPUT_CACHE) && !val && ctx->reflectionctx && ctx->savecache ) { + cache_save(ctx->filename, ctx->reflectionctx); + } + + if ( !val && (ctx->rmode == RECONSTRUCTION_PREDICTION) && (ctx->reflectionctx) ) { + val = ipr_refine(ctx); + } + + if ( !val && (ctx->reflectionctx) ) { + displaywindow_open(ctx); + } else { + fprintf(stderr, "Reconstruction failed.\n"); + gtk_exit(0); + } + +} + static gint main_method_window_response(GtkWidget *method_window, gint response, ControlContext *ctx) { if ( response == GTK_RESPONSE_OK ) { @@ -81,25 +104,8 @@ static gint main_method_window_response(GtkWidget *method_window, gint response, if ( ctx->prealign ) { prealign_do_series(ctx); - } - - if ( ctx->inputfiletype != INPUT_CACHE ) { - mapping_create(ctx); - } - - if ( (ctx->inputfiletype != INPUT_CACHE) && !val && ctx->reflectionctx && ctx->savecache ) { - cache_save(ctx->filename, ctx->reflectionctx); - } - - if ( !val && (ctx->rmode == RECONSTRUCTION_PREDICTION) && (ctx->reflectionctx) ) { - val = ipr_refine(ctx); - } - - if ( !val && (ctx->reflectionctx) ) { - displaywindow_open(ctx); } else { - fprintf(stderr, "Reconstruction failed.\n"); - gtk_exit(0); + main_do_reconstruction(ctx, val); } } else { |