pub enum PixelValuePolicy {
Reject,
ClipToZero,
Allow,
}Expand description
Policy for negative or non-finite pixel values encountered during load.
Variants§
Reject
Reject the load with IoError::BadPixelValue (default). Raw
detector counts are non-negative by construction, so a negative or
non-finite pixel signals corruption that must be surfaced, not
silently imported.
ClipToZero
Clamp negative values to 0.0, counting them in
TiffLoadInfo::n_clipped_pixels. Non-finite values still error —
clipping a NaN would invent data.
Allow
Accept all values verbatim. Needed for pre-normalized transmission stacks, where noise around zero legitimately produces small negative values.
Trait Implementations§
Source§impl Clone for PixelValuePolicy
impl Clone for PixelValuePolicy
Source§fn clone(&self) -> PixelValuePolicy
fn clone(&self) -> PixelValuePolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PixelValuePolicy
impl Debug for PixelValuePolicy
Source§impl Default for PixelValuePolicy
impl Default for PixelValuePolicy
Source§fn default() -> PixelValuePolicy
fn default() -> PixelValuePolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for PixelValuePolicy
impl PartialEq for PixelValuePolicy
impl Copy for PixelValuePolicy
impl Eq for PixelValuePolicy
impl StructuralPartialEq for PixelValuePolicy
Auto Trait Implementations§
impl Freeze for PixelValuePolicy
impl RefUnwindSafe for PixelValuePolicy
impl Send for PixelValuePolicy
impl Sync for PixelValuePolicy
impl Unpin for PixelValuePolicy
impl UnsafeUnpin for PixelValuePolicy
impl UnwindSafe for PixelValuePolicy
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.