diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-02-20 22:04:25 -0800 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:15 +0100 |
commit | 758fc675ab242bbd92130d9f644b8b96f8b52216 (patch) | |
tree | ee359617f796b862c9aa2bbd108785bf5acc0d74 /src/hdfsee.c | |
parent | 98a5819959910f9c82e21efb7192a1c1f4c0d7f7 (diff) |
hdfsee: Add --image option
Diffstat (limited to 'src/hdfsee.c')
-rw-r--r-- | src/hdfsee.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/hdfsee.c b/src/hdfsee.c index 3213d061..57a1d025 100644 --- a/src/hdfsee.c +++ b/src/hdfsee.c @@ -49,6 +49,8 @@ static void show_help(const char *s) " colour : Colour scale:\n" " black-blue-pink-red-orange-\n" " -yellow-white.\n" +" -e, --image=<element> Start up displaying this image from the\n" +" HDF5 file. Example: /data/data0.\n" "\n"); } @@ -91,6 +93,7 @@ int main(int argc, char *argv[]) int config_noisefilter = 0; int colscale = SCALE_COLOUR; char *cscale = NULL; + char *element = NULL; /* Long options */ const struct option longopts[] = { @@ -101,13 +104,14 @@ int main(int argc, char *argv[]) {"filter-cm", 0, &config_cmfilter, 1}, {"filter-noise", 0, &config_noisefilter, 1}, {"colscale", 1, NULL, 'c'}, + {"image", 1, NULL, 'e'}, {0, 0, NULL, 0} }; gtk_init(&argc, &argv); /* Short options */ - while ((c = getopt_long(argc, argv, "hp:b:i:c:", + while ((c = getopt_long(argc, argv, "hp:b:i:c:e:", longopts, NULL)) != -1) { switch (c) { @@ -138,6 +142,10 @@ int main(int argc, char *argv[]) cscale = strdup(optarg); break; + case 'e' : + element = strdup(optarg); + break; + case 0 : break; @@ -169,13 +177,12 @@ int main(int argc, char *argv[]) } free(cscale); - for ( i=0; i<nfiles; i++ ) { main_window_list[i] = displaywindow_open(argv[optind+i], peaks, boost, binning, config_cmfilter, config_noisefilter, - colscale); + colscale, element); if ( main_window_list[i] == NULL ) { ERROR("Couldn't open display window\n"); } else { |