pub enum DicomDecodeError {
Dicom(DcmError),
Metadata(MetadataError),
UnsupportedSamplesPerPixel {
samples_per_pixel: u16,
},
UnsupportedBitsAllocated {
bits_allocated: u16,
},
NativePixelLengthMismatch {
actual: usize,
frames: u32,
bytes_per_frame: usize,
},
MissingPixelData,
PixelCountMismatch {
frame_index: u32,
expected: usize,
actual: usize,
},
ExpectedSingleFrame {
actual_frames: usize,
},
}Expand description
Errors raised while decoding DICOM bytes into voxels.
Variants§
Dicom(DcmError)
The DICOM payload could not be parsed or decompressed.
Metadata(MetadataError)
Frame metadata could not be extracted.
UnsupportedSamplesPerPixel
The image uses an unsupported sample layout for volumetric decoding.
UnsupportedBitsAllocated
The image uses a pixel storage layout that is not yet supported.
NativePixelLengthMismatch
The frame count does not match the available native bytes.
Fields
MissingPixelData
No pixel data element was present in the dataset.
PixelCountMismatch
The decoded pixel count does not match the frame dimensions.
Fields
ExpectedSingleFrame
A single-frame decode helper was used for a multi-frame payload.
Trait Implementations§
Source§impl Debug for DicomDecodeError
impl Debug for DicomDecodeError
Source§impl Display for DicomDecodeError
impl Display for DicomDecodeError
Source§impl Error for DicomDecodeError
impl Error for DicomDecodeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DcmError> for DicomDecodeError
impl From<DcmError> for DicomDecodeError
Source§impl From<MetadataError> for DicomDecodeError
impl From<MetadataError> for DicomDecodeError
Source§fn from(source: MetadataError) -> Self
fn from(source: MetadataError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DicomDecodeError
impl !RefUnwindSafe for DicomDecodeError
impl Send for DicomDecodeError
impl Sync for DicomDecodeError
impl Unpin for DicomDecodeError
impl UnsafeUnpin for DicomDecodeError
impl !UnwindSafe for DicomDecodeError
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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