[][src]Struct dicom_transfer_syntax_registry::TransferSyntax

pub struct TransferSyntax<A = Box<dyn DataRWAdapter<Box<dyn Read + 'static>, Box<dyn Write + 'static>, Reader = Box<dyn Read + 'static>, Writer = Box<dyn Write + 'static>> + 'static + Send + Sync>> { /* fields omitted */ }

A DICOM transfer syntax specifier. The data RW adapter A specifies custom codec capabilities when required.

Methods

impl<A> TransferSyntax<A>[src]

pub const fn new(
    uid: &'static str,
    name: &'static str,
    byte_order: Endianness,
    explicit_vr: bool,
    codec: Codec<A>
) -> TransferSyntax<A>
[src]

pub const fn uid(&self) -> &'static str[src]

Obtain this transfer syntax' unique identifier.

pub const fn name(&self) -> &'static str[src]

Obtain the name of this transfer syntax.

pub const fn endianness(&self) -> Endianness[src]

Obtain this transfer syntax' expected endianness.

pub fn codec(&self) -> &Codec<A>[src]

Obtain this transfer syntax' codec specification.

pub fn fully_supported(&self) -> bool[src]

Check whether this transfer syntax specifier provides a complete implementation.

pub fn unsupported(&self) -> bool[src]

Check whether reading and writing of data sets is unsupported. If this is true, encoding and decoding will not be available.

pub fn unsupported_pixel_encapsulation(&self) -> bool[src]

Check whether reading and writing the pixel data is unsupported. If this is true, encoding and decoding of the data set will still be possible, but the pixel data will only be available in its encapsulated form.

pub fn get_decoder(
    &self
) -> Option<Box<dyn Decode<Source = dyn Read + 'static> + 'static>>
[src]

Retrieve the appropriate data element decoder for this transfer syntax. Can yield none if decoding is not supported.

The resulting decoder does not consider pixel data encapsulation or data set compression rules. This means that the consumer of this method needs to adapt the reader before using the decoder.

pub fn get_encoder(
    &self
) -> Option<Box<dyn Encode<Writer = dyn Write + 'static> + 'static>>
[src]

Retrieve the appropriate data element encoder for this transfer syntax. Can yield none if encoding is not supported. The resulting encoder does not consider pixel data encapsulation or data set compression rules.

pub fn get_basic_decoder(&self) -> BasicDecoder[src]

Obtain a dynamic basic decoder, based on this transfer syntax' expected endianness.

pub fn erased(
    self
) -> TransferSyntax<Box<dyn DataRWAdapter<Box<dyn Read + 'static>, Box<dyn Write + 'static>, Reader = Box<dyn Read + 'static>, Writer = Box<dyn Write + 'static>> + 'static + Send + Sync>> where
    A: Send + Sync + 'static + DataRWAdapter<Box<dyn Read + 'static>, Box<dyn Write + 'static>, Reader = Box<dyn Read + 'static>, Writer = Box<dyn Write + 'static>>, 
[src]

Type-erase the pixel data or data set codec.

Trait Implementations

impl Collect for TransferSyntax<Box<dyn DataRWAdapter<Box<dyn Read + 'static>, Box<dyn Write + 'static>, Reader = Box<dyn Read + 'static>, Writer = Box<dyn Write + 'static>> + 'static + Send + Sync>>

impl<A> Debug for TransferSyntax<A> where
    A: Debug
[src]

Auto Trait Implementations

impl<A> Send for TransferSyntax<A> where
    A: Send

impl<A> Unpin for TransferSyntax<A> where
    A: Unpin

impl<A> Sync for TransferSyntax<A> where
    A: Sync

impl<A> UnwindSafe for TransferSyntax<A> where
    A: UnwindSafe

impl<A> RefUnwindSafe for TransferSyntax<A> where
    A: RefUnwindSafe

Blanket Implementations

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

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

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.

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

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

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