Trait dicom_core::value::DicomValueType
source · pub trait DicomValueType: HasLength {
// Required methods
fn value_type(&self) -> ValueType;
fn cardinality(&self) -> usize;
}
Expand description
A trait for a value that maps to a DICOM element data value.
Required Methods§
sourcefn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Retrieve the specific type of this value.
sourcefn cardinality(&self) -> usize
fn cardinality(&self) -> usize
Retrieve the number of elements contained in the DICOM value.
In a sequence value, this is the number of items in the sequence. In an encapsulated pixel data sequence, the output is always 1. Otherwise, the output is the number of elements effectively encoded in the value.