pub enum PhotometricInterpretation {
Monochrome1,
Monochrome2,
PaletteColor,
Rgb,
YbrFull,
YbrFull422,
YbrPartial420,
YbrIct,
YbrRct,
Other(String),
}
Expand description
A decoded representation of the DICOM Photometric Interpretation attribute.
See section C.7.6.3 of the standard for more details about each photometric interpretation.
In the event that the photometric interpretation is not
any of the specified variants,
the Other
variant is used.
Note that this enumeration covers the ones which are known,
not necessarily supported in the decoding process.
Variants
Monochrome1
MONOCHROME1
:
Pixel data represent a single monochrome image plane.
The minimum sample value is intended to be displayed as white.
Monochrome2
MONOCHROME2
:
Pixel data represent a single monochrome image plane.
The minimum sample value is intended to be displayed as black.
PaletteColor
PALETTE COLOR
:
Pixel data describe a color image with a single sample per pixel
(single image plane).
Rgb
RGB
:
Pixel data represent a color image described by
red, green, and blue image planes.
YbrFull
YBR_FULL
:
Pixel data represent a color image described by
one luminance (Y) and two chrominance planes (CB and CR)
and as a result there are half as many CB and CR values as Y values.
YbrFull422
YBR_FULL_422
:
The same as YBR_FULL except that the CB and CR values
are sampled horizontally at half the Y rate.
YbrPartial420
YBR_PARTIAL_420
:
Pixel data represent a color image described by
one luminance (Y) and two chrominance planes (CB and CR).
The CB and CR values are sampled
horizontally and vertically at half the Y rate
and as a result there are four times less CB and CR values than Y values.
YbrIct
YBR_ICT
:
Irreversible Color Transformation.
Pixel data represent a color image described by
one luminance (Y) and two chrominance planes (CB and CR).
YbrRct
YBR_RCT
:
Rreversible Color Transformation.
Pixel data represent a color image described by
one luminance (Y) and two chrominance planes (CB and CR).
Other(String)
The photometric interpretation is not one of the known variants.
Note: this value is assumed to be different from
any other variant listed above,
and no checks are made to ensure this assumption.
The construction of PhotometricInterpretation::Other
when one of the existing variants is applicable
is considered a bug.
Note 2: subsequent crate versions may introduce new variants,
and as a consequence break any user depending on the Other
variant.
If you need to depend on an unspecified variant,
you should also double check the photometric interpretations here
every time the crate is updated.
Implementations
Trait Implementations
sourceimpl AsRef<str> for PhotometricInterpretation
impl AsRef<str> for PhotometricInterpretation
sourceimpl Clone for PhotometricInterpretation
impl Clone for PhotometricInterpretation
sourcefn clone(&self) -> PhotometricInterpretation
fn clone(&self) -> PhotometricInterpretation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PhotometricInterpretation
impl Debug for PhotometricInterpretation
sourceimpl Display for PhotometricInterpretation
impl Display for PhotometricInterpretation
sourceimpl From<&'_ str> for PhotometricInterpretation
impl From<&'_ str> for PhotometricInterpretation
sourceimpl From<String> for PhotometricInterpretation
impl From<String> for PhotometricInterpretation
sourceimpl PartialEq<PhotometricInterpretation> for PhotometricInterpretation
impl PartialEq<PhotometricInterpretation> for PhotometricInterpretation
sourcefn eq(&self, other: &PhotometricInterpretation) -> bool
fn eq(&self, other: &PhotometricInterpretation) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PhotometricInterpretation) -> bool
fn ne(&self, other: &PhotometricInterpretation) -> bool
This method tests for !=
.
impl StructuralPartialEq for PhotometricInterpretation
Auto Trait Implementations
impl RefUnwindSafe for PhotometricInterpretation
impl Send for PhotometricInterpretation
impl Sync for PhotometricInterpretation
impl Unpin for PhotometricInterpretation
impl UnwindSafe for PhotometricInterpretation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more