aboutsummaryrefslogtreecommitdiff
path: root/src/im-zmq.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-05-28 14:34:10 +0200
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commitc5424abc8fccfa6b205db45f0ae2d64a362f01f5 (patch)
tree98b6a331c27481b8648faa62733f26a50919897e /src/im-zmq.c
parentab352f28b1c9d2691e4f39730b0ad5adf056426b (diff)
Convert stream to DataTemplate
Diffstat (limited to 'src/im-zmq.c')
-rw-r--r--src/im-zmq.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/im-zmq.c b/src/im-zmq.c
index 39f1d207..09230938 100644
--- a/src/im-zmq.c
+++ b/src/im-zmq.c
@@ -228,17 +228,13 @@ ImageFeatureList *get_peaks_msgpack(msgpack_object *obj,
ss = peak_y->via.array.ptr[pk].via.f64 + peak_offset;
val = peak_i->via.array.ptr[pk].via.f64;
- pn = data_template_find_panel(dtempl, fs, ss);
- if ( pn < -1 ) {
+ /* Convert coordinates to panel-relative */
+ if ( data_template_file_to_panel_coords(dtempl, &fs, &ss, &pn) ) {
ERROR("Peak not in panel!\n");
- continue;
+ } else {
+ image_add_feature(features, fs, ss, pn,
+ NULL, val, NULL);
}
-
- /* Convert coordinates to panel-relative */
- data_template_file_to_panel_coords(dtempl, &fs, &ss);
-
- image_add_feature(features, fs, ss, pn,
- NULL, val, NULL);
}
return features;