aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-06-12 11:49:47 +0200
committerThomas White <taw@physics.org>2018-06-12 11:49:47 +0200
commit4db987d3287416c43aa8f05880bda872e91c2e7c (patch)
tree0e5a46f6f7d4e5e7ef8387ee6f315a9addae937f /src
parentf76f4b698b8d9daf0ad91bc25e27e6256e2f0496 (diff)
hdfsee: Show image size at binning 1
Used to be "raw image size", but that's meaningless since "de-slabbification". All the panels are stored separately. This commit also clarifies the meaning of "Smaller numbers".
Diffstat (limited to 'src')
-rw-r--r--src/dw-hdfsee.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c
index 7dd26ea4..933972fe 100644
--- a/src/dw-hdfsee.c
+++ b/src/dw-hdfsee.c
@@ -720,6 +720,7 @@ static gint displaywindow_set_binning(GtkWidget *widget, DisplayWindow *dw)
GtkWidget *table;
GtkWidget *label;
char tmp[64];
+ double minx, maxx, miny, maxy;
if ( dw->binning_dialog != NULL ) {
return 0;
@@ -751,14 +752,16 @@ static gint displaywindow_set_binning(GtkWidget *widget, DisplayWindow *dw)
gtk_table_set_col_spacings(GTK_TABLE(table), 5);
gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(table), FALSE, FALSE, 0);
- label = gtk_label_new("Smaller numbers mean larger images on screen");
+ label = gtk_label_new("Smaller binning factors mean larger images on screen");
gtk_label_set_markup(GTK_LABEL(label),
"<span style=\"italic\" weight=\"light\">"
- "Smaller numbers mean larger images on screen</span>");
+ "Smaller binning factors mean larger images on screen</span>");
gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(label),
1, 3, 1, 2);
- snprintf(tmp, 63, "Raw image size: (unknown)");
+
+ get_pixel_extents(dw->image->det, &minx, &miny, &maxx, &maxy);
+ snprintf(tmp, 63, "Image size at binning 1: about %.0f x %.0f pixels", maxx-minx, maxy-miny);
label = gtk_label_new(tmp);
gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(label),
1, 3, 2, 3);