aboutsummaryrefslogtreecommitdiff
path: root/src/gui_peaksearch.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-20 16:25:55 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commit5728c0692e16eae0c3eb89090b86ffa7cbb09c1f (patch)
treeeb0ddac0054e531d03977789fea29e6d297d7625 /src/gui_peaksearch.c
parent8fd798cac14122f5760545d83287ec98ff262c88 (diff)
Implement peak list from file in GUI
Diffstat (limited to 'src/gui_peaksearch.c')
-rw-r--r--src/gui_peaksearch.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gui_peaksearch.c b/src/gui_peaksearch.c
index b1204b98..67f066ae 100644
--- a/src/gui_peaksearch.c
+++ b/src/gui_peaksearch.c
@@ -48,15 +48,21 @@
void update_peaks(struct crystfelproject *proj)
{
- struct image *image;
if ( proj->n_frames == 0 ) return;
if ( proj->show_peaks ) {
+ struct image *image;
+ const DataTemplate *dtempl;
+
image = crystfel_image_view_get_image_struct(CRYSTFEL_IMAGE_VIEW(proj->imageview));
if ( image == NULL ) return;
+ dtempl = crystfel_image_view_get_datatemplate(CRYSTFEL_IMAGE_VIEW(proj->imageview));
+ image_feature_list_free(image->features);
+ image->features = NULL;
+
switch ( proj->peak_search_params.method ) {
case PEAK_ZAEF:
@@ -82,6 +88,14 @@ void update_peaks(struct crystfelproject *proj)
1);
break;
+ case PEAK_HDF5:
+ case PEAK_CXI:
+ image->features = image_read_peaks(dtempl,
+ image->filename,
+ image->ev,
+ proj->peak_search_params.half_pixel_shift);
+ break;
+
default:
ERROR("This peak detection method not implemented!\n");
break;
@@ -390,10 +404,8 @@ gint peaksearch_sig(GtkWidget *widget, struct crystfelproject *proj)
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(combo), TRUE, TRUE, 2.0);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "zaef",
"Zaefferer gradient search (zaef)");
- gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "cxi",
- "Get list from CXI file");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "hdf5",
- "Get list from HDF5 file");
+ "Use the peak lists in the data files (hdf5/cxi)");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(combo), "peakfinder8",
"Radial background estimation (peakfinder8)");
#ifdef HAVE_FDIP