Struct dicom_object::mem::InMemDicomObject [−][src]
pub struct InMemDicomObject<D = StandardDataDictionary> { /* fields omitted */ }
A DICOM object that is fully contained in memory.
Implementations
impl InMemDicomObject<StandardDataDictionary>[src]
impl InMemDicomObject<StandardDataDictionary>[src]pub fn create_empty() -> Self[src]
Create a new empty DICOM object.
pub fn from_element_source<I>(iter: I) -> Result<Self> where
I: IntoIterator<Item = Result<InMemElement<StandardDataDictionary>>>, [src]
I: IntoIterator<Item = Result<InMemElement<StandardDataDictionary>>>,
Construct a DICOM object from a fallible source of structured elements.
pub fn from_element_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = InMemElement<StandardDataDictionary>>, [src]
I: IntoIterator<Item = InMemElement<StandardDataDictionary>>,
Construct a DICOM object from a non-fallible source of structured elements.
pub fn read_dataset<S>(decoder: S) -> Result<Self> where
S: StatefulDecode, [src]
S: StatefulDecode,
Read an object from a source using the given decoder.
Note: read_dataset_with_ts and read_dataset_with_ts_cs
may be easier to use.
pub fn read_dataset_with_ts_cs<S>(
from: S,
ts: &TransferSyntax,
cs: SpecificCharacterSet
) -> Result<Self> where
S: Read, [src]
from: S,
ts: &TransferSyntax,
cs: SpecificCharacterSet
) -> Result<Self> where
S: Read,
Read an object from a source, using the given transfer syntax and default character set.
If the attribute Specific Character Set is found in the encoded data, this will override the given character set.
pub fn read_dataset_with_ts<S>(from: S, ts: &TransferSyntax) -> Result<Self> where
S: Read, [src]
S: Read,
Read an object from a source, using the given transfer syntax.
The default character set is assumed until Specific Character Set is found in the encoded data, after which the text decoder will be overriden accordingly.
impl<D> InMemDicomObject<D> where
D: DataDictionary,
D: Clone, [src]
impl<D> InMemDicomObject<D> where
D: DataDictionary,
D: Clone, [src]pub fn new_empty_with_dict(dict: D) -> Self[src]
Create a new empty object, using the given dictionary for name lookup.
pub fn from_element_source_with_dict<I>(iter: I, dict: D) -> Result<Self> where
I: IntoIterator<Item = Result<InMemElement<D>>>, [src]
I: IntoIterator<Item = Result<InMemElement<D>>>,
Construct a DICOM object from an iterator of structured elements.
pub fn from_iter_with_dict<I>(iter: I, dict: D) -> Self where
I: IntoIterator<Item = InMemElement<D>>, [src]
I: IntoIterator<Item = InMemElement<D>>,
Construct a DICOM object from a non-fallible iterator of structured elements.
pub fn read_dataset_with_dict<S>(decoder: S, dict: D) -> Result<Self> where
S: StatefulDecode,
D: DataDictionary, [src]
S: StatefulDecode,
D: DataDictionary,
Read an object from a source, using the given decoder and the given dictionary for name lookup.
pub fn read_dataset_with_dict_ts<S>(
from: S,
dict: D,
ts: &TransferSyntax
) -> Result<Self> where
S: Read,
D: DataDictionary, [src]
from: S,
dict: D,
ts: &TransferSyntax
) -> Result<Self> where
S: Read,
D: DataDictionary,
Read an object from a source, using the given data dictionary and transfer syntax.
pub fn read_dataset_with_dict_ts_cs<S>(
from: S,
dict: D,
ts: &TransferSyntax,
cs: SpecificCharacterSet
) -> Result<Self> where
S: Read,
D: DataDictionary, [src]
from: S,
dict: D,
ts: &TransferSyntax,
cs: SpecificCharacterSet
) -> Result<Self> where
S: Read,
D: DataDictionary,
Read an object from a source, using the given data dictionary, transfer syntax, and the given character set to assume by default.
If the attribute Specific Character Set is found in the encoded data, this will override the given character set.
pub fn meta(&self) -> Option<&FileMetaTable>[src]
Retrieve the object’s meta table if available.
At the moment, this is sure to return None, because the meta
table is kept in a separate wrapper value.
pub fn element(&self, tag: Tag) -> Result<&InMemElement<D>>[src]
Retrieve a particular DICOM element by its tag.
pub fn element_by_name(&self, name: &str) -> Result<&InMemElement<D>>[src]
Retrieve a particular DICOM element by its name.
pub fn put(&mut self, elt: InMemElement<D>) -> Option<InMemElement<D>>[src]
Insert a data element to the object, replacing (and returning) any previous element of the same attribute.
pub fn take_element(&mut self, tag: Tag) -> Result<InMemElement<D>>[src]
Removes and returns a particular DICOM element by its tag.
pub fn take_element_by_name(&mut self, name: &str) -> Result<InMemElement<D>>[src]
Removes and returns a particular DICOM element by its name.
pub fn write_dataset<W, E, T>(
&self,
to: W,
encoder: E,
text_encoder: T
) -> Result<()> where
W: Write,
E: EncodeTo<W>,
T: TextCodec, [src]
&self,
to: W,
encoder: E,
text_encoder: T
) -> Result<()> where
W: Write,
E: EncodeTo<W>,
T: TextCodec,
Write this object’s data set into the given writer, with the specified encoder specifications, without preamble, magic code, nor file meta group.
Note: write_dataset_with_ts and write_dataset_with_ts_cs
may be easier to use.
pub fn write_dataset_with_ts_cs<W>(
&self,
to: W,
ts: &TransferSyntax,
cs: SpecificCharacterSet
) -> Result<()> where
W: Write, [src]
&self,
to: W,
ts: &TransferSyntax,
cs: SpecificCharacterSet
) -> Result<()> where
W: Write,
Write this object’s data set into the given printer, with the specified transfer syntax and character set, without preamble, magic code, nor file meta group.
If the attribute Specific Character Set is found in the data set, the last parameter is overridden accordingly.
pub fn write_dataset_with_ts<W>(&self, to: W, ts: &TransferSyntax) -> Result<()> where
W: Write, [src]
W: Write,
Write this object’s data set into the given printer, with the specified transfer syntax, without preamble, magic code, nor file meta group.
The default character set is assumed until the Specific Character Set is found in the data set, after which the text encoder is overridden accordingly.
pub fn with_exact_meta(self, meta: FileMetaTable) -> FileDicomObject<Self>[src]
Encapsulate this object to contain a file meta group as described exactly by the given table.
Note: this method will not adjust the file meta group to be semantically valid for the object.
pub fn with_meta(
self,
meta: FileMetaTableBuilder
) -> Result<FileDicomObject<Self>>[src]
self,
meta: FileMetaTableBuilder
) -> Result<FileDicomObject<Self>>
Encapsulate this object to contain a file meta group, created through the given file meta table builder.
The attribute Media Storage SOP Instance UID will be filled in with the contents of the object, if the attribute SOP Instance UID is present. A complete file meta group should still provide the media storage SOP class UID and transfer syntax.
Trait Implementations
impl<D: Clone> Clone for InMemDicomObject<D>[src]
impl<D: Clone> Clone for InMemDicomObject<D>[src]fn clone(&self) -> InMemDicomObject<D>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<D: Debug> Debug for InMemDicomObject<D>[src]
impl<D: Debug> Debug for InMemDicomObject<D>[src]impl<'s, D: 's> DicomObject for &'s InMemDicomObject<D> where
D: DataDictionary,
D: Clone, [src]
impl<'s, D: 's> DicomObject for &'s InMemDicomObject<D> where
D: DataDictionary,
D: Clone, [src]impl<D> Extend<DataElement<InMemDicomObject<D>, Vec<u8, Global>>> for InMemDicomObject<D>[src]
impl<D> Extend<DataElement<InMemDicomObject<D>, Vec<u8, Global>>> for InMemDicomObject<D>[src]fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = InMemElement<D>>, [src]
I: IntoIterator<Item = InMemElement<D>>,
pub fn extend_one(&mut self, item: A)[src]
pub fn extend_reserve(&mut self, additional: usize)[src]
impl<D> HasLength for InMemDicomObject<D>[src]
impl<D> HasLength for InMemDicomObject<D>[src]impl<'a, D> IntoIterator for &'a InMemDicomObject<D>[src]
impl<'a, D> IntoIterator for &'a InMemDicomObject<D>[src]type Item = &'a InMemElement<D>
The type of the elements being iterated over.
type IntoIter = Values<'a, Tag, InMemElement<D>>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<D> IntoIterator for InMemDicomObject<D>[src]
impl<D> IntoIterator for InMemDicomObject<D>[src]impl<D> IntoTokens for InMemDicomObject<D>[src]
impl<D> IntoTokens for InMemDicomObject<D>[src]type Iter = InMemObjectTokens<<InMemDicomObject<D> as IntoIterator>::IntoIter>
The iterator type through which tokens are obtained.
fn into_tokens(self) -> Self::Iter[src]
impl<'a, D> IntoTokens for &'a InMemDicomObject<D> where
D: Clone, [src]
impl<'a, D> IntoTokens for &'a InMemDicomObject<D> where
D: Clone, [src]type Iter = InMemObjectTokens<Cloned<<&'a InMemDicomObject<D> as IntoIterator>::IntoIter>>
The iterator type through which tokens are obtained.
fn into_tokens(self) -> Self::Iter[src]
Auto Trait Implementations
impl<D> RefUnwindSafe for InMemDicomObject<D> where
D: RefUnwindSafe,
impl<D> RefUnwindSafe for InMemDicomObject<D> where
D: RefUnwindSafe, impl<D> Send for InMemDicomObject<D> where
D: Send,
impl<D> Send for InMemDicomObject<D> where
D: Send, impl<D> Sync for InMemDicomObject<D> where
D: Sync,
impl<D> Sync for InMemDicomObject<D> where
D: Sync, impl<D> Unpin for InMemDicomObject<D> where
D: Unpin,
impl<D> Unpin for InMemDicomObject<D> where
D: Unpin, impl<D> UnwindSafe for InMemDicomObject<D> where
D: RefUnwindSafe + UnwindSafe,
impl<D> UnwindSafe for InMemDicomObject<D> where
D: RefUnwindSafe + UnwindSafe,