diff options
author | Thomas White <taw27@cam.ac.uk> | 2008-11-04 10:51:56 +0000 |
---|---|---|
committer | Thomas White <taw27@cam.ac.uk> | 2008-11-04 10:51:56 +0000 |
commit | 4702bbb6ae06a7c51bb2d85a93a651240d166a05 (patch) | |
tree | e9cf596fd04b2134b8fd76c3e52dc7ae99585fbc | |
parent | 02d7823efcd3f1b4c4b413d849d85b24d11645a1 (diff) | |
parent | 7992f60bbb46bb8fff758b41e45f7dc28c31012e (diff) |
Merge branch 'master' into simple-search
-rw-r--r-- | src/control.c | 3 | ||||
-rw-r--r-- | src/displaywindow.c | 3 | ||||
-rw-r--r-- | src/imagedisplay.c | 4 | ||||
-rw-r--r-- | src/imagedisplay.h | 3 | ||||
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/mrc.c | 5 | ||||
-rw-r--r-- | src/prealign.c | 7 | ||||
-rw-r--r-- | src/qdrp.c | 5 | ||||
-rw-r--r-- | src/readpng.c | 1 |
9 files changed, 22 insertions, 15 deletions
diff --git a/src/control.c b/src/control.c index b822457..256a979 100644 --- a/src/control.c +++ b/src/control.c @@ -3,7 +3,7 @@ * * Common control structure * - * (c) 2007 Thomas White <taw27@cam.ac.uk> + * (c) 2007-2008 Thomas White <taw27@cam.ac.uk> * * dtr - Diffraction Tomography Reconstruction * @@ -32,6 +32,7 @@ ControlContext *control_ctx_new() { ctx->refine_window = NULL; ctx->cell_lattice = NULL; ctx->integrated = NULL; + ctx->cache_filename = NULL; return ctx; diff --git a/src/displaywindow.c b/src/displaywindow.c index 61540b8..f1c974a 100644 --- a/src/displaywindow.c +++ b/src/displaywindow.c @@ -691,7 +691,8 @@ DisplayWindow *displaywindow_open(ControlContext *ctx) { if ( ctx->images->n_images > 0 ) { dw->stack = imagedisplay_new_nowindow(ctx->images->images[dw->cur_image], - IMAGEDISPLAY_SHOW_TILT_AXIS | IMAGEDISPLAY_SHOW_CENTRE, NULL, NULL, NULL); + IMAGEDISPLAY_SHOW_TILT_AXIS | IMAGEDISPLAY_SHOW_CENTRE | IMAGEDISPLAY_SCALE_BAR, + NULL, NULL, NULL); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dw->stack->vbox, gtk_label_new("Image Stack")); displaywindow_update_imagestack(dw); } else { diff --git a/src/imagedisplay.c b/src/imagedisplay.c index ca730e5..8915c41 100644 --- a/src/imagedisplay.c +++ b/src/imagedisplay.c @@ -231,7 +231,9 @@ static gboolean imagedisplay_redraw(GtkWidget *drawingarea, GdkEventExpose *even } /* Add scale bar */ - imagedisplay_add_scalebar(imagedisplay, drawingarea, scale, xoffs, yoffs); + if ( imagedisplay->flags & IMAGEDISPLAY_SCALE_BAR ) { + imagedisplay_add_scalebar(imagedisplay, drawingarea, scale, xoffs, yoffs); + } /* NB This calls the function above, which sorts out stuff */ if ( imagedisplay->flags & IMAGEDISPLAY_SHOW_CENTRE ) { diff --git a/src/imagedisplay.h b/src/imagedisplay.h index 3462a83..9933201 100644 --- a/src/imagedisplay.h +++ b/src/imagedisplay.h @@ -26,7 +26,8 @@ typedef enum { IMAGEDISPLAY_SHOW_CENTRE = 1<<1, IMAGEDISPLAY_SHOW_TILT_AXIS = 1<<2, IMAGEDISPLAY_QUIT_IF_CLOSED = 1<<3, - IMAGEDISPLAY_FREE = 1<<4 + IMAGEDISPLAY_FREE = 1<<4, + IMAGEDISPLAY_SCALE_BAR = 1<<5 } ImageDisplayFlags; typedef enum { @@ -3,8 +3,8 @@ * * The Top Level Source File * - * (c) 2007 Thomas White <taw27@cam.ac.uk> - * Gordon Ball <gfb21@cam.ac.uk> + * (c) 2007-2008 Thomas White <taw27@cam.ac.uk> + * (c) 2007 Gordon Ball <gfb21@cam.ac.uk> * * dtr - Diffraction Tomography Reconstruction * @@ -48,7 +48,7 @@ void main_do_reconstruction(ControlContext *ctx) { prealign_fine_centering(ctx->images, ctx->sum_stack); } - if ( !ctx->cache_filename ) { + if ( ctx->cache_filename == NULL ) { int i; @@ -3,7 +3,7 @@ * * Read the MRC tomography format * - * (c) 2007 Thomas White <taw27@cam.ac.uk> + * (c) 2007-2008 Thomas White <taw27@cam.ac.uk> * * dtr - Diffraction Tomography Reconstruction * @@ -72,7 +72,8 @@ int mrc_read(ControlContext *ctx) { int16_t *image = malloc(mrc.ny * mrc.nx * sizeof(uint16_t)); uint16_t *uimage = malloc(mrc.ny * mrc.nx * sizeof(uint16_t)); - printf("Image #%3i: tilt=%f deg omega=%f deg L=%f m\n", i, ext[i].a_tilt, ext[i].tilt_axis, ext[i].magnification); + printf("Image #%3i: tilt=%f deg omega=%f deg L=%f m\n", i, ext[i].a_tilt, ext[i].tilt_axis, + ext[i].magnification); ctx->camera_length = ext[i].magnification; if ( ext[i].voltage == 0 ) { ctx->lambda = lambda(200000); diff --git a/src/prealign.c b/src/prealign.c index cd53cbc..ee57529 100644 --- a/src/prealign.c +++ b/src/prealign.c @@ -68,8 +68,8 @@ void prealign_do_series(ControlContext *ctx) { pb->n = 0; pb->ctx = ctx; pb->id = imagedisplay_open_with_message(ctx->images->images[pb->n], "Image Pre-alignment", - "Click the centre of the zero-order beam as accurately as you can.", IMAGEDISPLAY_QUIT_IF_CLOSED, - G_CALLBACK(prealign_clicked), pb); + "Click the centre of the zero-order beam as accurately as you can.", + IMAGEDISPLAY_QUIT_IF_CLOSED, G_CALLBACK(prealign_clicked), pb); } @@ -182,7 +182,8 @@ void prealign_sum_stack(ImageList *list, int have_centres, int sum_stack) { total_record.image = image_total; total_record.width = twidth; total_record.height = theight; - sum_id = imagedisplay_open(total_record, "Sum of All Images", IMAGEDISPLAY_SHOW_CENTRE | IMAGEDISPLAY_SHOW_TILT_AXIS | IMAGEDISPLAY_FREE); + sum_id = imagedisplay_open(total_record, "Sum of All Images", + IMAGEDISPLAY_SHOW_CENTRE | IMAGEDISPLAY_SHOW_TILT_AXIS | IMAGEDISPLAY_FREE); } } @@ -3,7 +3,8 @@ * * Handle QDRP-style control files * - * (c) 2007 Thomas White <taw27@cam.ac.uk> + * (c) 2007-2008 Thomas White <taw27@cam.ac.uk> + * * dtr - Diffraction Tomography Reconstruction * */ @@ -108,7 +109,7 @@ static int qdrp_parseline(ControlContext *ctx, const char *line) { } ctx->started = 1; - ctx->reflectionlist = reflectionlist_new(); + ctx->fmode = FORMULATION_CLEN; } diff --git a/src/readpng.c b/src/readpng.c index d310abb..8b70f8e 100644 --- a/src/readpng.c +++ b/src/readpng.c @@ -109,7 +109,6 @@ int readpng_read(const char *filename, double tilt, ControlContext *ctx) { row_pointers = png_get_rows(png_ptr, info_ptr); image = malloc(height * width * sizeof(uint16_t)); - ctx->fmode = FORMULATION_CLEN; for ( y=0; y<height; y++ ) { for ( x=0; x<width; x++ ) { |