Add to_items helper
Allows for easy access to sequential data for example when trying
to access data stored in CONTENT_SEQUENCE tags commonly used in
SR files.
@@ -483,6 +483,14 @@ where
) -> Result<Vec<DicomDateTime>, ConvertValueError> {
self.value().to_multi_datetime(default_offset)
}
+
+ /// Retrieve items stored in value
+ ///
+ /// If value is not a sequence return None.
+ ///
+ pub fn to_items(&self) -> Option<&[I]> {
+ self.value().items()
+ }
}
impl<'v, I, P> DataElementRef<'v, I, P>
