diff options
author | Thomas White <taw@physics.org> | 2013-09-19 11:29:28 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-09-19 11:29:28 +0200 |
commit | 72b949c4ec28e76dea966d88eae549fad6548143 (patch) | |
tree | 58e4c6838811cdab862564f10543b64add88137f /src/dw-hdfsee.c | |
parent | c922fc1bc1fdad83bfd00e17f134b8d9a05884db (diff) |
hdfsee: Use beam parameters file (--beam option)
Diffstat (limited to 'src/dw-hdfsee.c')
-rw-r--r-- | src/dw-hdfsee.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index ddfa831a..3b361207 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -1813,6 +1813,7 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks, double boost, int binning, int noisefilter, int colscale, const char *element, const char *geometry, + const char *beam, int show_rings, double *ring_radii, int n_rings, double ring_size, int median_filter) @@ -1846,6 +1847,15 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks, dw->ring_radii = ring_radii; dw->n_rings = n_rings; dw->median_filter = median_filter; + dw->image = calloc(1, sizeof(struct image)); + + if ( beam != NULL ) { + dw->image->beam = get_beam_parameters(beam); + } + + if ( (dw->image->beam != NULL) && (dw->hdfile != NULL) ) { + fill_in_beam_parameters(dw->image->beam, dw->hdfile); + } /* Open the file, if any */ if ( filename != NULL ) { @@ -1864,7 +1874,6 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks, } if ( !fail ) { - dw->image = calloc(1, sizeof(struct image)); dw->image->filename = strdup(filename); hdf5_read(dw->hdfile, dw->image, 0); } else { |