pub enum Scale {
Natural,
Auto,
Fixed(f64),
}Expand description
How a frame’s scalar field is mapped onto the colormap’s [0, 1] / [-1, 1] input range.
render_frame picks between the first two. The third exists for animation: auto-contrast is
computed per frame, so a sequence rendered that way re-scales on every frame and the brightness
visibly pumps. Holding one extent across the sequence is what makes an exported video readable.
Variants§
Natural
Read values at their natural scale — f32 reprs in [0, 1] / [-1, 1], integer counts /255.
Auto
Stretch to this frame’s own robust extent (auto-contrast).
Fixed(f64)
Stretch to a caller-supplied extent, shared across however many frames the caller renders.
Values beyond it clamp to the end of the colormap. A non-positive extent falls back to
Scale::Natural, so a calibration pass over blank frames cannot black out a whole video.
Trait Implementations§
impl Copy for Scale
impl StructuralPartialEq for Scale
Auto Trait Implementations§
impl Freeze for Scale
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnsafeUnpin for Scale
impl UnwindSafe for Scale
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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