[−][src]Struct dicom_encoding::transfer_syntax::TransferSyntax
A DICOM transfer syntax specifier. The data RW adapter A
specifies
custom codec capabilities when required.
Implementations
impl<A> TransferSyntax<A>
[src]
pub const fn new(
uid: &'static str,
name: &'static str,
byte_order: Endianness,
explicit_vr: bool,
codec: Codec<A>
) -> Self
[src]
uid: &'static str,
name: &'static str,
byte_order: Endianness,
explicit_vr: bool,
codec: Codec<A>
) -> Self
Create a new transfer syntax descriptor.
- Note that only transfer syntax implementors are expected to construct
- TS descriptors from scratch. For a practical usage of transfer syntaxes,
- one should look up an existing transfer syntax registry by UID.
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 decoder<'s>(&self) -> Option<DynDecoder<dyn Read + 's>>
[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 decoder_for<S: ?Sized>(&self) -> Option<DynDecoder<S>> where
Self: Sized,
S: Read,
[src]
Self: Sized,
S: Read,
Retrieve the appropriate data element decoder for this transfer syntax and given reader type (this method is not object safe). 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 encoder<'w>(&self) -> Option<DynEncoder<'w, dyn Write + 'w>>
[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 encoder_for<'w, W: 'w + ?Sized>(&self) -> Option<DynEncoder<'w, W>> where
Self: Sized,
W: Write,
[src]
Self: Sized,
W: Write,
Retrieve the appropriate data element encoder for this transfer syntax and the given writer type (this method is not object safe). Can yield none if encoding is not supported. The resulting encoder does not consider pixel data encapsulation or data set compression rules.
pub fn basic_decoder(&self) -> BasicDecoder
[src]
Obtain a dynamic basic decoder, based on this transfer syntax' expected endianness.
pub fn erased(self) -> TransferSyntax where
A: Send + Sync + 'static,
A: DataRWAdapter<Box<dyn Read>, Box<dyn Write>, Reader = Box<dyn Read>, Writer = Box<dyn Write>>,
[src]
A: Send + Sync + 'static,
A: DataRWAdapter<Box<dyn Read>, Box<dyn Write>, Reader = Box<dyn Read>, Writer = Box<dyn Write>>,
Type-erase the pixel data or data set codec.
Trait Implementations
Auto Trait Implementations
impl<A> RefUnwindSafe for TransferSyntax<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for TransferSyntax<A> where
A: Send,
A: Send,
impl<A> Sync for TransferSyntax<A> where
A: Sync,
A: Sync,
impl<A> Unpin for TransferSyntax<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for TransferSyntax<A> where
A: UnwindSafe,
A: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,