pub trait DicomObject {
type Element: Header;
// Required methods
fn element(&self, tag: Tag) -> Result<Self::Element, AccessError>;
fn element_by_name(
&self,
name: &str,
) -> Result<Self::Element, AccessByNameError>;
// Provided method
fn meta(&self) -> Option<&FileMetaTable> { ... }
}
Expand description
Trait type for a DICOM object. This is a high-level abstraction where an object is accessed and manipulated as dictionary of entries indexed by tags, which in turn may contain a DICOM object.
This trait interface is experimental and prone to sudden changes.
Required Associated Types§
Required Methods§
Sourcefn element(&self, tag: Tag) -> Result<Self::Element, AccessError>
fn element(&self, tag: Tag) -> Result<Self::Element, AccessError>
Retrieve a particular DICOM element by its tag.
Sourcefn element_by_name(
&self,
name: &str,
) -> Result<Self::Element, AccessByNameError>
fn element_by_name( &self, name: &str, ) -> Result<Self::Element, AccessByNameError>
Retrieve a particular DICOM element by its name.
Provided Methods§
Sourcefn meta(&self) -> Option<&FileMetaTable>
fn meta(&self) -> Option<&FileMetaTable>
Retrieve the processed meta information table, if available.
This table will generally not be reachable from children objects in another object with a valid meta table. As such, it is recommended for this method to be called at the root of a DICOM object.