aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-01-18 09:46:26 +0100
committerThomas White <taw@physics.org>2024-02-06 16:59:34 +0100
commit604c081d5f8dffc7a78cb07c245dae531342db04 (patch)
tree71d1d900e23c6c2c0a3761a9e485dd040d07d659 /libcrystfel/src/image.h
parent513827a44d1ddd395f677a74617b42934ca9bc64 (diff)
Crystals shouldn't own RefLists (part 2)
This commit replaces image.crystals with an array of small structs, each consisting of a Crystal-RefList pair. index.c and stream.c are updated, more to follow.
Diffstat (limited to 'libcrystfel/src/image.h')
-rw-r--r--libcrystfel/src/image.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/libcrystfel/src/image.h b/libcrystfel/src/image.h
index 7e4bad1f..beb66810 100644
--- a/libcrystfel/src/image.h
+++ b/libcrystfel/src/image.h
@@ -110,6 +110,12 @@ typedef enum
} DataSourceType;
+struct crystal_refls
+{
+ Crystal *cr;
+ RefList *refls;
+};
+
struct image
{
/** The image data, by panel */
@@ -124,8 +130,8 @@ struct image
/** Non-zero if the frame was determined to be a "hit" */
int hit;
- /**Array of crystals in the image */
- Crystal **crystals;
+ /** Array of crystals (with reflection lists) in the image */
+ struct crystal_refls *crystals;
/** The number of crystals in the image (size of \p crystals) */
int n_crystals;
@@ -218,6 +224,8 @@ extern ImageFeatureList *sort_peaks(ImageFeatureList *flist);
extern ImageFeatureList *image_feature_list_copy(const ImageFeatureList *flist);
extern void image_add_crystal(struct image *image, Crystal *cryst);
+extern void image_add_crystal_refls(struct image *image,
+ Crystal *cryst, RefList *reflist);
extern int remove_flagged_crystals(struct image *image);
extern void free_all_crystals(struct image *image);