Struct dicom_object::FileDicomObject[][src]

pub struct FileDicomObject<O> { /* fields omitted */ }

A root DICOM object retrieved from a standard DICOM file, containing additional information from the file meta group in a separate table value.

Implementations

impl FileDicomObject<InMemDicomObject<StandardDataDictionary>>[src]

pub fn open_file<P: AsRef<Path>>(path: P) -> Result<Self>[src]

Create a DICOM object by reading from a file.

This function assumes the standard file encoding structure: 128-byte preamble, file meta group, and the rest of the data set.

pub fn from_reader<S>(src: S) -> Result<Self> where
    S: Read
[src]

Create a DICOM object by reading from a byte source.

This function assumes the standard file encoding structure without the preamble: file meta group, followed by the rest of the data set.

impl<D> FileDicomObject<InMemDicomObject<D>> where
    D: DataDictionary,
    D: Clone
[src]

pub fn new_empty_with_dict_and_meta(dict: D, meta: FileMetaTable) -> Self[src]

Create a new empty object, using the given dictionary and file meta table.

pub fn open_file_with_dict<P: AsRef<Path>>(path: P, dict: D) -> Result<Self>[src]

Create a DICOM object by reading from a file.

This function assumes the standard file encoding structure: 128-byte preamble, file meta group, and the rest of the data set.

pub fn open_file_with<P: AsRef<Path>, R>(
    path: P,
    dict: D,
    ts_index: R
) -> Result<Self> where
    P: AsRef<Path>,
    R: TransferSyntaxIndex
[src]

Create a DICOM object by reading from a file.

This function assumes the standard file encoding structure: 128-byte preamble, file meta group, and the rest of the data set.

This function allows you to choose a different transfer syntax index, but its use is only advised when the built-in transfer syntax registry is insufficient. Otherwise, please use open_file_with_dict instead.

pub fn from_reader_with_dict<S>(src: S, dict: D) -> Result<Self> where
    S: Read
[src]

Create a DICOM object by reading from a byte source.

This function assumes the standard file encoding structure without the preamble: file meta group, followed by the rest of the data set.

pub fn from_reader_with<'s, S: 's, R>(
    src: S,
    dict: D,
    ts_index: R
) -> Result<Self> where
    S: Read,
    R: TransferSyntaxIndex
[src]

Create a DICOM object by reading from a byte source.

This function assumes the standard file encoding structure without the preamble: file meta group, followed by the rest of the data set.

This function allows you to choose a different transfer syntax index, but its use is only advised when the built-in transfer syntax registry is insufficient. Otherwise, please use from_reader_with_dict instead.

impl FileDicomObject<InMemDicomObject<StandardDataDictionary>>[src]

pub fn new_empty_with_meta(meta: FileMetaTable) -> Self[src]

Create a new empty object, using the given file meta table.

impl<O> FileDicomObject<O>[src]

pub fn meta(&self) -> &FileMetaTable[src]

Retrieve the processed meta header table.

pub fn into_inner(self) -> O[src]

Retrieve the inner DICOM object structure, discarding the meta table.

impl<O> FileDicomObject<O> where
    &'a O: IntoTokens
[src]

pub fn write_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Write the entire object as a DICOM file into the given file path. Preamble, magic code, and file meta group will be included before the inner object.

pub fn write_all<W: Write>(&self, to: W) -> Result<()>[src]

Write the entire object as a DICOM file into the given writer. Preamble, magic code, and file meta group will be included before the inner object.

pub fn write_meta<W: Write>(&self, to: W) -> Result<()>[src]

Write the file meta group set into the given writer.

This is equivalent to self.meta().write(to).

pub fn write_dataset<W: Write>(&self, to: W) -> Result<()>[src]

Write the inner data set into the given writer, without preamble, magic code, nor file meta group.

The transfer syntax is selected from the file meta table.

Trait Implementations

impl<O: Clone> Clone for FileDicomObject<O>[src]

impl<O: Debug> Debug for FileDicomObject<O>[src]

impl<O> Deref for FileDicomObject<O>[src]

type Target = O

The resulting type after dereferencing.

impl<O> DerefMut for FileDicomObject<O>[src]

impl<O> DicomObject for FileDicomObject<O> where
    O: DicomObject
[src]

type Element = <O as DicomObject>::Element

impl<'a, O: 'a> DicomObject for &'a FileDicomObject<O> where
    O: DicomObject
[src]

type Element = <O as DicomObject>::Element

impl<O> IntoIterator for FileDicomObject<O> where
    O: IntoIterator
[src]

type Item = <O as IntoIterator>::Item

The type of the elements being iterated over.

type IntoIter = <O as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<O: PartialEq> PartialEq<FileDicomObject<O>> for FileDicomObject<O>[src]

impl<O> StructuralPartialEq for FileDicomObject<O>[src]

Auto Trait Implementations

impl<O> RefUnwindSafe for FileDicomObject<O> where
    O: RefUnwindSafe

impl<O> Send for FileDicomObject<O> where
    O: Send

impl<O> Sync for FileDicomObject<O> where
    O: Sync

impl<O> Unpin for FileDicomObject<O> where
    O: Unpin

impl<O> UnwindSafe for FileDicomObject<O> where
    O: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.