pub struct AnnotationGroup { /* private fields */ }Implementations§
Source§impl AnnotationGroup
impl AnnotationGroup
pub fn points( label: impl Into<String>, category: DicomCode, property_type: DicomCode, recommended_display_cielab: [u16; 3], points: Vec<Point2>, ) -> Result<Self>
pub fn polygons( label: impl Into<String>, category: DicomCode, property_type: DicomCode, recommended_display_cielab: [u16; 3], polygons: Vec<Vec<Point2>>, ) -> Result<Self>
pub fn with_description(self, description: impl Into<String>) -> Result<Self>
Sourcepub fn with_uid(self, uid: impl Into<String>) -> Result<Self>
pub fn with_uid(self, uid: impl Into<String>) -> Result<Self>
Replaces the DICOM Annotation Group UID with a stable, caller-owned UID.
This is useful when one tracked finding is represented by one ANN group and its identity must remain stable across repeated exports.
Sourcepub fn with_deterministic_uid(
self,
namespace: &str,
scope: &str,
application_key: &str,
) -> Result<Self>
pub fn with_deterministic_uid( self, namespace: &str, scope: &str, application_key: &str, ) -> Result<Self>
Derives a stable DICOM Annotation Group UID from caller identity and group semantics.
Geometry, measurements, and the group’s current UID are deliberately excluded so that moving or remeasuring one logical group does not change its identity. Changing its label, coded finding, generation metadata, display color, or applicability does change the UID.
pub fn with_generation( self, generation_type: GenerationType, algorithms: Vec<AlgorithmIdentification>, ) -> Result<Self>
pub fn with_property_type_modifiers(self, modifiers: Vec<DicomCode>) -> Self
pub fn with_anatomic_regions(self, regions: Vec<DicomCode>) -> Self
pub fn with_primary_anatomic_structures( self, structures: Vec<DicomCode>, ) -> Self
pub fn with_referenced_optical_paths(self, paths: Vec<String>) -> Result<Self>
pub fn with_common_z_coordinates(self, coordinates: Vec<f64>) -> Result<Self>
pub fn add_measurement( &mut self, measurement: AnnotationMeasurement, ) -> Result<()>
pub fn validate_geometry(&self) -> Result<()>
pub fn annotation_count(&self) -> usize
pub fn uid(&self) -> &str
pub fn label(&self) -> &str
pub fn description(&self) -> &str
pub const fn generation_type(&self) -> GenerationType
pub fn algorithms(&self) -> &[AlgorithmIdentification]
pub fn category(&self) -> &DicomCode
pub fn property_type(&self) -> &DicomCode
pub fn property_type_modifiers(&self) -> &[DicomCode]
pub fn anatomic_regions(&self) -> &[DicomCode]
pub fn primary_anatomic_structures(&self) -> &[DicomCode]
pub const fn applies_to_all_optical_paths(&self) -> bool
pub fn referenced_optical_paths(&self) -> &[String]
pub const fn applies_to_all_z_planes(&self) -> bool
pub fn common_z_coordinates(&self) -> &[f64]
pub const fn recommended_display_cielab(&self) -> [u16; 3]
pub fn geometry(&self) -> &AnnotationGeometry
pub fn point_annotations(&self) -> Option<&[Point2]>
Sourcepub fn replace_points(&mut self, points: Vec<Point2>) -> Result<()>
pub fn replace_points(&mut self, points: Vec<Point2>) -> Result<()>
Atomically replaces point geometry after revalidating all group invariants.
pub fn polygon_annotations(&self) -> Option<&[Vec<Point2>]>
Sourcepub fn replace_polygons(&mut self, polygons: Vec<Vec<Point2>>) -> Result<()>
pub fn replace_polygons(&mut self, polygons: Vec<Vec<Point2>>) -> Result<()>
Atomically replaces polygon geometry after revalidating all group invariants.
pub fn measurements(&self) -> &[AnnotationMeasurement]
pub const fn editable(&self) -> bool
Trait Implementations§
Source§impl Clone for AnnotationGroup
impl Clone for AnnotationGroup
Source§impl Debug for AnnotationGroup
impl Debug for AnnotationGroup
Source§impl PartialEq for AnnotationGroup
impl PartialEq for AnnotationGroup
impl StructuralPartialEq for AnnotationGroup
Auto Trait Implementations§
impl Freeze for AnnotationGroup
impl RefUnwindSafe for AnnotationGroup
impl Send for AnnotationGroup
impl Sync for AnnotationGroup
impl Unpin for AnnotationGroup
impl UnsafeUnpin for AnnotationGroup
impl UnwindSafe for AnnotationGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more