aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detgeom.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-06-15 12:07:14 +0200
committerThomas White <taw@physics.org>2023-07-28 13:22:05 +0200
commitaada11e09edca22f816f4471c73fff6d6a383256 (patch)
tree798a9c90c85fd27dee780a95ecab1526299b0db8 /libcrystfel/src/detgeom.h
parentc6115928bb875b0ed408655ff12b9ca00dae017c (diff)
detgeom: Add references from children to parents
This allows us to start from the panel and work upwards to the top-level group, which makes hierarchical gradient calculation much easier.
Diffstat (limited to 'libcrystfel/src/detgeom.h')
-rw-r--r--libcrystfel/src/detgeom.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libcrystfel/src/detgeom.h b/libcrystfel/src/detgeom.h
index 0b37e9f1..917b6bd3 100644
--- a/libcrystfel/src/detgeom.h
+++ b/libcrystfel/src/detgeom.h
@@ -83,6 +83,9 @@ struct detgeom_panel
int w;
int h;
/*@}*/
+
+ /** \name Leaf group containing this panel (only) */
+ const struct detgeom_panel_group *group;
};
@@ -91,8 +94,12 @@ struct detgeom_panel_group
char *name;
int n_children;
+ struct detgeom_panel_group *parent;
+ int hierarchy_level;
+ int member_index;
+
/* If n_children > 0, here are the child groups */
- const struct detgeom_panel_group **children;
+ struct detgeom_panel_group **children;
/* If n_children == 0, this is a leaf node, so: */
struct detgeom_panel *panel;