diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-28 12:43:49 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-28 12:43:49 +0000 |
commit | 0ef8783c72948f9c8c4af1170ae2d8414a2bd13e (patch) | |
tree | e11e80ab4441480c9fb621202b70cc81b11cce32 /src/main.c | |
parent | 737154b1ef16ef037df988eaa64a5063df1d815c (diff) |
Add skeleton prealignment procedure
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@79 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -31,6 +31,7 @@ #include "ipr.h" #include "cache.h" #include "mapping.h" +#include "prealign.h" static gint main_method_window_response(GtkWidget *method_window, gint response, ControlContext *ctx) { @@ -53,6 +54,12 @@ static gint main_method_window_response(GtkWidget *method_window, gint response, default: ctx->psmode = PEAKSEARCH_NONE; break; /* This happens when reading from a cache file */ } + if ( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ctx->checkbox_prealign)) ) { + ctx->prealign = TRUE; + } else { + ctx->prealign = FALSE; + } + gtk_widget_destroy(method_window); while ( gtk_events_pending() ) gtk_main_iteration(); @@ -66,6 +73,10 @@ static gint main_method_window_response(GtkWidget *method_window, gint response, val=0; } + if ( ctx->prealign ) { + prealign_do_series(ctx); + } + if ( ctx->inputfiletype != INPUT_CACHE ) { mapping_create(ctx); } @@ -108,9 +119,10 @@ void main_method_dialog_open(ControlContext *ctx) { vbox = gtk_vbox_new(FALSE, 0); hbox = gtk_hbox_new(TRUE, 0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(method_window)->vbox), GTK_WIDGET(hbox), FALSE, FALSE, 7); - gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(vbox), FALSE, FALSE, 5); + gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(vbox), FALSE, FALSE, 10); - table = gtk_table_new(3, 2, FALSE); + table = gtk_table_new(4, 2, FALSE); + gtk_table_set_row_spacings(GTK_TABLE(table), 5); method_label = gtk_label_new("Reconstruction Algorithm: "); gtk_table_attach_defaults(GTK_TABLE(table), method_label, 1, 2, 1, 2); @@ -134,6 +146,9 @@ void main_method_dialog_open(ControlContext *ctx) { gtk_combo_box_set_active(GTK_COMBO_BOX(ctx->combo_peaksearch), 3); gtk_table_attach_defaults(GTK_TABLE(table), ctx->combo_peaksearch, 2, 3, 2, 3); + ctx->checkbox_prealign = gtk_check_button_new_with_label("Pre-align image stack"); + gtk_table_attach_defaults(GTK_TABLE(table), ctx->checkbox_prealign, 1, 3, 3, 4); + if ( ctx->inputfiletype == INPUT_CACHE ) { gtk_combo_box_append_text(GTK_COMBO_BOX(ctx->combo_peaksearch), "Get from cache file"); gtk_widget_set_sensitive(GTK_WIDGET(ctx->combo_peaksearch), FALSE); |