@@ -35,7 +35,7 @@ contains. The required metadata elements include:
3535* A ``uid `` (``str `` or :class: `highdicom.UID `) uniquely identifying the group.
3636 Usually, you will want to generate a UID for this.
3737* An ``annotated_property_category `` and ``annotated_property_type ``
38- (:class: `highdicom.sr.CodedConcept `) coded values (see :ref: `coding `)
38+ (:class: `highdicom.sr.CodedConcept `), coded values (see :ref: `coding `)
3939 describing the category and specific structure that has been annotated.
4040* A ``graphic_type `` (:class: `highdicom.ann.GraphicTypeValues `) indicating the
4141 "form" of the annotations. Permissible values are ``"ELLIPSE" ``, ``"POINT" ``,
@@ -45,8 +45,23 @@ contains. The required metadata elements include:
4545 algorithm used to generate the annotations (``"MANUAL" ``,
4646 ``"SEMIAUTOMATIC" ``, or ``"AUTOMATIC" ``).
4747
48- Further optional metadata may optionally be provided, see the API documentation
49- for more information.
48+ Further optional metadata may optionally be provided, including:
49+
50+ * An ``algorithm_identification ``
51+ (:class: `highdicom.AlgorithmIdentificationSequence `), specifying information
52+ about an algorithm that generated the annotations.
53+ * A list of ``anatomic_regions `` (a sequence of
54+ :class: `highdicom.sr.CodedConcept ` objects), giving coded values (see
55+ :ref: `coding `) describing regions containing the annotations.
56+ * A list of ``primary_anatomic_structures `` (a sequence of
57+ :class: `highdicom.sr.CodedConcept ` objects) giving coded values (see
58+ :ref: `coding `) describing anatomic structures of interest.
59+ * A free-text ``description `` (``str ``) of the annotation group.
60+ * A ``display_color `` (:class: `highdicom.color.CIELabColor `) giving a
61+ recommended value for viewers to use to render these annotations. This is in
62+ CIE-Lab color space, but alternative constructors of the
63+ :class: `highdicom.color.CIELabColor ` class allow conversion from RGB values
64+ or well-known color names.
5065
5166The actual annotation data is passed to the group as a list of
5267``numpy.ndarray `` objects, each of shape (*N * x *D *). *N * is the number of
@@ -88,6 +103,7 @@ Here is a simple example of constructing an annotation group:
88103 algorithm_type = hd.ann.AnnotationGroupGenerationTypeValues.MANUAL ,
89104 graphic_type = hd.ann.GraphicTypeValues.POINT ,
90105 graphic_data = graphic_data,
106+ display_color = hd.color.CIELabColor.from_string(' turquoise' ),
91107 )
92108
93109 Note that including two nuclei would be very unusual in practice: annotations
@@ -141,6 +157,7 @@ Here is the above example with an area measurement included:
141157 graphic_type = hd.ann.GraphicTypeValues.POINT ,
142158 graphic_data = graphic_data,
143159 measurements = [area_measurement],
160+ display_color = hd.color.CIELabColor.from_string(' lawngreen' ),
144161 )
145162
146163 Constructing MicroscopyBulkSimpleAnnotation Objects
@@ -256,7 +273,7 @@ of matching groups, since the filters may match multiple groups.
256273
257274 # If there are no matches, an empty list is returned
258275 groups = ann.get_annotation_groups(
259- annotated_property_type = Code(' 53982002' , " SCT" , " Cell membrane" ),
276+ annotated_property_type = Code(' 53982002' , ' SCT' , ' Cell membrane' ),
260277 )
261278 assert len (groups) == 0
262279
0 commit comments