pub struct LazyDataSetReader<S> { /* private fields */ }
Expand description
An attached iterator for retrieving DICOM object element markers from a random access data source.
This iterator produces data tokens without eagerly reading the bytes of a value.
Implementations§
Source§impl<R> LazyDataSetReader<DynStatefulDecoder<R>>
impl<R> LazyDataSetReader<DynStatefulDecoder<R>>
Sourcepub fn new_with_ts(source: R, ts: &TransferSyntax) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts(source: R, ts: &TransferSyntax) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader expecting the given transfer syntax that reads from the given random access source.
Sourcepub fn new_with_ts_cs(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts_cs(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader with the given random access source and element dictionary, while considering the given transfer syntax and specific character set.
Sourcepub fn new_with_ts_options(
source: R,
ts: &TransferSyntax,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts_options(
source: R,
ts: &TransferSyntax,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader expecting the given transfer syntax that reads from the given random access source, with extra parsing options.
Sourcepub fn new_with_ts_cs_options(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
pub fn new_with_ts_cs_options(
source: R,
ts: &TransferSyntax,
cs: SpecificCharacterSet,
options: LazyDataSetReaderOptions,
) -> Result<Self>where
R: ReadSeek,
Create a new lazy data set reader with the given random access source and element dictionary, while considering the given transfer syntax and specific character set.
Source§impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
Sourcepub fn new_with_options(parser: S, options: LazyDataSetReaderOptions) -> Selfwhere
S: StatefulDecode,
pub fn new_with_options(parser: S, options: LazyDataSetReaderOptions) -> Selfwhere
S: StatefulDecode,
Create a new lazy data set reader using the given stateful decoder, with extra parsing options.
Source§impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
impl<S> LazyDataSetReader<S>where
S: StatefulDecode,
Sourcepub fn into_decoder(self) -> S
pub fn into_decoder(self) -> S
Retrieve the inner stateful decoder from this data set reader.
Sourcepub fn advance(&mut self) -> Option<Result<LazyDataToken<&mut S>>>
pub fn advance(&mut self) -> Option<Result<LazyDataToken<&mut S>>>
Advance and retrieve the next DICOM data token.
Note: For the data set to be successfully parsed, the resulting data tokens needs to be consumed if they are of a value type.
Sourcepub fn peek(&mut self) -> Result<Option<&DataToken>>
pub fn peek(&mut self) -> Result<Option<&DataToken>>
Peek the next token from the source by
reading a new token in the first call.
Subsequent calls to peek
will return the same token
until another consumer method is called.
Peeking only works in a data or item element boundary, so the returned data token is either an element header or an item header. At the moment, a failed peek will result in a hard break, preventing further iteration.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for LazyDataSetReader<S>where
S: Freeze,
impl<S> RefUnwindSafe for LazyDataSetReader<S>where
S: RefUnwindSafe,
impl<S> Send for LazyDataSetReader<S>where
S: Send,
impl<S> Sync for LazyDataSetReader<S>where
S: Sync,
impl<S> Unpin for LazyDataSetReader<S>where
S: Unpin,
impl<S> UnwindSafe for LazyDataSetReader<S>where
S: 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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