pub struct PixelFragmentSequence<P> { /* private fields */ }
Expand description
A sequence of pixel data fragments.
Each fragment (of data type P
) is
an even-lengthed sequence of bytes
representing the encoded pixel data.
The first item of the sequence is interpreted as a basic offset table,
which is defined separately.
Implementations§
Source§impl<P> PixelFragmentSequence<P>
impl<P> PixelFragmentSequence<P>
Sourcepub fn new(offset_table: impl Into<C<u32>>, fragments: impl Into<C<P>>) -> Self
pub fn new(offset_table: impl Into<C<u32>>, fragments: impl Into<C<P>>) -> Self
Construct a DICOM pixel sequence sequence value from a basic offset table and a list of fragments.
Note: This function does not validate the offset table against the given fragments.
Sourcepub fn new_fragments(fragments: impl Into<C<P>>) -> Self
pub fn new_fragments(fragments: impl Into<C<P>>) -> Self
Construct a DICOM pixel sequence sequence value from a list of fragments, with an empty basic offset table.
Sourcepub fn fragments(&self) -> &[P]
pub fn fragments(&self) -> &[P]
Gets a reference to the pixel data fragments.
This sequence does not include the offset table.
Sourcepub fn fragments_mut(&mut self) -> &mut C<P>
pub fn fragments_mut(&mut self) -> &mut C<P>
Gets a mutable reference to the pixel data fragments.
This sequence does not include the offset table.
Sourcepub fn into_fragments(self) -> C<P>
pub fn into_fragments(self) -> C<P>
Retrieve the pixel data fragments, discarding the rest of the information.
This sequence does not include the offset table.
Sourcepub fn into_parts(self) -> (C<u32>, C<P>)
pub fn into_parts(self) -> (C<u32>, C<P>)
Decompose the sequence into its constituent parts: the basic offset table and the pixel data fragments.
Sourcepub fn offset_table(&self) -> &[u32]
pub fn offset_table(&self) -> &[u32]
Gets a reference to the encapsulated pixel data’s offset table.
Sourcepub fn offset_table_mut(&mut self) -> &mut C<u32>
pub fn offset_table_mut(&mut self) -> &mut C<u32>
Gets a mutable reference to the encapsulated pixel data’s offset table.
Sourcepub fn length(&self) -> Length
pub fn length(&self) -> Length
Get the value data’s length as specified by the sequence’s data element, in bytes.
This is equivalent to HasLength::length
.
Trait Implementations§
Source§impl<P: Clone> Clone for PixelFragmentSequence<P>
impl<P: Clone> Clone for PixelFragmentSequence<P>
Source§fn clone(&self) -> PixelFragmentSequence<P>
fn clone(&self) -> PixelFragmentSequence<P>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<P: Debug> Debug for PixelFragmentSequence<P>
impl<P: Debug> Debug for PixelFragmentSequence<P>
Source§impl<P> DicomValueType for PixelFragmentSequence<P>
impl<P> DicomValueType for PixelFragmentSequence<P>
Source§fn value_type(&self) -> ValueType
fn value_type(&self) -> ValueType
Source§fn cardinality(&self) -> usize
fn cardinality(&self) -> usize
Source§impl<T, F, P> From<(T, F)> for PixelFragmentSequence<P>
impl<T, F, P> From<(T, F)> for PixelFragmentSequence<P>
Source§impl<I, P> From<PixelFragmentSequence<P>> for Value<I, P>
impl<I, P> From<PixelFragmentSequence<P>> for Value<I, P>
Source§fn from(value: PixelFragmentSequence<P>) -> Self
fn from(value: PixelFragmentSequence<P>) -> Self
Source§impl From<Vec<Fragments>> for PixelFragmentSequence<InMemFragment>
impl From<Vec<Fragments>> for PixelFragmentSequence<InMemFragment>
Source§impl<P> HasLength for PixelFragmentSequence<P>
impl<P> HasLength for PixelFragmentSequence<P>
Source§impl<P: PartialEq> PartialEq for PixelFragmentSequence<P>
impl<P: PartialEq> PartialEq for PixelFragmentSequence<P>
impl<P> StructuralPartialEq for PixelFragmentSequence<P>
Auto Trait Implementations§
impl<P> Freeze for PixelFragmentSequence<P>where
P: Freeze,
impl<P> RefUnwindSafe for PixelFragmentSequence<P>where
P: RefUnwindSafe,
impl<P> Send for PixelFragmentSequence<P>where
P: Send,
impl<P> Sync for PixelFragmentSequence<P>where
P: Sync,
impl<P> Unpin for PixelFragmentSequence<P>where
P: Unpin,
impl<P> UnwindSafe for PixelFragmentSequence<P>where
P: RefUnwindSafe + UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more