aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-10 13:43:30 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:45 +0200
commit865959d6b3adaae1f80fb50da4bebdd9b5d31830 (patch)
treed8da59cc4e0215d77935c88f2b3cc1dd96285435 /src
parentf7ea70e422fafdc886d5829d1bb5f9f3e75d726f (diff)
Add --no-image-data and --no-mask-data
Diffstat (limited to 'src')
-rw-r--r--src/crystfel_gui.c3
-rw-r--r--src/indexamajig.c11
-rw-r--r--src/process_image.c11
-rw-r--r--src/process_image.h1
4 files changed, 20 insertions, 6 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 54e2b72d..fc7e265f 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -159,7 +159,8 @@ static void update_imageview(struct crystfelproject *proj)
image = image_read(proj->dtempl,
proj->filenames[proj->cur_frame],
- proj->events[proj->cur_frame]);
+ proj->events[proj->cur_frame],
+ 0, 0);
if ( image == NULL ) {
ERROR("Failed to load image\n");
diff --git a/src/indexamajig.c b/src/indexamajig.c
index f9c938a3..68b293f6 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -9,7 +9,7 @@
* Copyright © 2012 Lorenzo Galli
*
* Authors:
- * 2010-2019 Thomas White <taw@physics.org>
+ * 2010-2020 Thomas White <taw@physics.org>
* 2011 Richard Kirian
* 2012 Lorenzo Galli
* 2012 Chunhong Yoon
@@ -81,6 +81,7 @@ struct indexamajig_arguments
int basename;
int zmq;
int no_image_data;
+ int no_mask_data;
int serial_start;
char *temp_location;
int if_refine;
@@ -210,6 +211,10 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
"yet work in a useful way.\n");
break;
+ case 210 :
+ args->no_mask_data = 1;
+ break;
+
/* ---------- Peak search ---------- */
case 't' :
@@ -658,6 +663,7 @@ int main(int argc, char *argv[])
args.iargs.fix_profile_r = -1.0;
args.iargs.fix_divergence = -1.0;
args.iargs.no_image_data = 0;
+ args.iargs.no_mask_data = 0;
argp_program_version_hook = show_version;
@@ -690,9 +696,10 @@ int main(int argc, char *argv[])
"processing"},
{"zmq-msgpack", 207, NULL, OPTION_NO_USAGE, "Receive data in MessagePack format "
"over ZMQ"},
- {"no-image-data", 208, NULL, OPTION_NO_USAGE, "Do not load image data (from ZMQ)"},
+ {"no-image-data", 208, NULL, OPTION_NO_USAGE, "Do not load image data"},
{"spectrum-file", 209, "fn", OPTION_NO_USAGE | OPTION_HIDDEN,
"File containing radiation spectrum"},
+ {"no-mask-data", 210, NULL, OPTION_NO_USAGE, "Do not load mask data"},
{NULL, 0, 0, OPTION_DOC, "Peak search options:", 3},
{"peaks", 301, "method", 0, "Peak search method. Default: zaef"},
diff --git a/src/process_image.c b/src/process_image.c
index bec73a08..179997e2 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -106,7 +106,9 @@ static struct image *file_wait_open_read(const char *filename,
TimeAccounts *taccs,
char *last_task,
signed int wait_for_file,
- int cookie)
+ int cookie,
+ int no_image_data,
+ int no_mask_data)
{
signed int file_wait_time = wait_for_file;
int wait_message_done = 0;
@@ -157,7 +159,8 @@ static struct image *file_wait_open_read(const char *filename,
set_last_task(last_task, "read file");
sb_shared->pings[cookie]++;
- image = image_read(dtempl, filename, event);
+ image = image_read(dtempl, filename, event,
+ no_image_data, no_mask_data);
if ( image == NULL ) {
if ( wait_for_file && !read_retry_done ) {
read_retry_done = 1;
@@ -201,7 +204,9 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
iargs->dtempl,
sb_shared, taccs, last_task,
iargs->wait_for_file,
- cookie);
+ cookie,
+ iargs->no_image_data,
+ iargs->no_mask_data);
if ( image == NULL ) {
if ( iargs->wait_for_file != 0 ) {
pthread_mutex_lock(&sb_shared->totals_lock);
diff --git a/src/process_image.h b/src/process_image.h
index 6e86f923..50f69918 100644
--- a/src/process_image.h
+++ b/src/process_image.h
@@ -98,6 +98,7 @@ struct index_args
Spectrum *spectrum;
signed int wait_for_file; /* -1 means wait forever */
int no_image_data;
+ int no_mask_data;
};