diff options
-rw-r--r-- | src/displaywindow.c | 3 | ||||
-rw-r--r-- | src/displaywindow.h | 3 | ||||
-rw-r--r-- | src/hdfsee.c | 10 | ||||
-rw-r--r-- | src/render.c | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c index 899332e0..d7f66002 100644 --- a/src/displaywindow.c +++ b/src/displaywindow.c @@ -941,7 +941,7 @@ static gint displaywindow_press(GtkWidget *widget, GdkEventButton *event, DisplayWindow *displaywindow_open(const char *filename, const char *peaks, - int boost, int binning) + int boost, int binning, int clean) { DisplayWindow *dw; char *title; @@ -1007,6 +1007,7 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks, dw->binning = binning; dw->boostint = boost; + dw->clean = clean; displaywindow_update(dw); /* Peak list provided at startup? */ diff --git a/src/displaywindow.h b/src/displaywindow.h index f0491460..1520a1b1 100644 --- a/src/displaywindow.h +++ b/src/displaywindow.h @@ -62,6 +62,7 @@ typedef struct { int height; /* Size of the drawing area */ int binning; int boostint; + int clean; /* Whether or not to clean the image */ int show_col_scale; int monochrome; @@ -72,7 +73,7 @@ typedef struct { /* Open an image display window showing the given filename, or NULL */ extern DisplayWindow *displaywindow_open(const char *filename, const char *peaks, int boost, - int binning); + int binning, int clean); #endif /* DISPLAYWINDOW_H */ diff --git a/src/hdfsee.c b/src/hdfsee.c index 3d578fbf..5306059b 100644 --- a/src/hdfsee.c +++ b/src/hdfsee.c @@ -36,8 +36,11 @@ static void show_help(const char *s) " -h, --help Display this help message.\n" "\n" " -p, --peak-overlay=<filename> Draw circles in positions listed in file.\n" -" -i, --int-boost=<n> Multiple intensity by <n>.\n" +" -i, --int-boost=<n> Multiply intensity by <n>.\n" " -b, --binning=<n> Set display binning to <n>.\n" +" --clean-image Perform common-mode noise subtraction and\n" +" background removal on images before\n" +" proceeding.\n" "\n"); } @@ -76,6 +79,7 @@ int main(int argc, char *argv[]) char *peaks = NULL; int boost = 1; int binning = 2; + int config_clean = 0; /* Long options */ const struct option longopts[] = { @@ -83,6 +87,7 @@ int main(int argc, char *argv[]) {"peak-overlay", 1, NULL, 'p'}, {"int-boost", 1, NULL, 'i'}, {"binning", 1, NULL, 'b'}, + {"clean-image", 0, &config_clean, 1}, {0, 0, NULL, 0} }; @@ -140,7 +145,8 @@ int main(int argc, char *argv[]) for ( i=0; i<nfiles; i++ ) { main_window_list[i] = displaywindow_open(argv[optind+i], peaks, - boost, binning); + boost, binning, + config_clean); if ( main_window_list[i] == NULL ) { ERROR("Couldn't open display window\n"); } else { diff --git a/src/render.c b/src/render.c index ca86f28c..3586b962 100644 --- a/src/render.c +++ b/src/render.c @@ -79,7 +79,7 @@ int16_t *render_get_image_binned(DisplayWindow *dw, int binning, int16_t *max) hdf5_read(dw->hdfile, image); dw->image_dirty = 0; - clean_image(image); + if ( dw->clean ) clean_image(image); /* Deal with the old image, if existing */ if ( dw->image != NULL ) { |