diff options
author | Thomas White <taw@physics.org> | 2020-07-10 15:30:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:45 +0200 |
commit | 30973775e4bddba8ceebf4b93f58440cbb520617 (patch) | |
tree | bf11a7762e8d14e24d551e550243b8233147c005 /libcrystfel/src/stream.c | |
parent | 47ecc15f4f32350bb29085459e23f208007e3d1c (diff) |
stream_read_chunk: Add option to load image data
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r-- | libcrystfel/src/stream.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index dbb213bf..02abd549 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -1013,7 +1013,15 @@ struct image *stream_read_chunk(Stream *st, const DataTemplate *dtempl, if ( have_filename && have_ev ) { /* Success */ create_detgeom(image, dtempl); - image_set_zero_data(image, dtempl); + if ( srf & STREAM_IMAGE_DATA ) { + image_read_image_data(image, + dtempl, + image->filename, + image->ev); + } else { + image_set_zero_data(image, dtempl); + } + image_set_zero_mask(image, dtempl); return image; } ERROR("Incomplete chunk found in input file.\n"); |