pub struct SaveResidualsEvery { /* private fields */ }Expand description
Periodically saves one signed intensity-residual PNG per measured frame.
Each image is scaled symmetrically around zero so mid-gray represents zero, dark pixels are negative residuals, and bright pixels are positive residuals.
Implementations§
Trait Implementations§
Source§impl Callback for SaveResidualsEvery
impl Callback for SaveResidualsEvery
Source§fn requires(&self) -> Vec<DiagnosticRequest>
fn requires(&self) -> Vec<DiagnosticRequest>
Declares diagnostics required at every hook by legacy or non-periodic callbacks.
Source§fn requires_for(
&self,
hook: CallbackHook,
iteration: usize,
) -> Vec<DiagnosticRequest>
fn requires_for( &self, hook: CallbackHook, iteration: usize, ) -> Vec<DiagnosticRequest>
Requests diagnostics for a specific hook. Built-in periodic callbacks
override this to avoid computing snapshots on inactive iterations.
Source§fn on_start(&mut self, _context: &StepContext<'_>) -> Result<CallbackAction>
fn on_start(&mut self, _context: &StepContext<'_>) -> Result<CallbackAction>
Runs once after state initialization and may stop before processing frames.
Source§fn on_iteration_end(
&mut self,
context: &StepContext<'_>,
) -> Result<CallbackAction>
fn on_iteration_end( &mut self, context: &StepContext<'_>, ) -> Result<CallbackAction>
Runs after a complete iteration and may request clean termination.
Source§fn on_frame_end(&mut self, _context: &StepContext<'_>) -> Result<CallbackAction>
fn on_frame_end(&mut self, _context: &StepContext<'_>) -> Result<CallbackAction>
Runs once for every completed frame when frame callbacks are enabled.
For multi-frame algorithms, all frames in a batch observe the same
post-batch state while
frame_index and natural loss remain per-frame.Auto Trait Implementations§
impl Freeze for SaveResidualsEvery
impl RefUnwindSafe for SaveResidualsEvery
impl Send for SaveResidualsEvery
impl Sync for SaveResidualsEvery
impl Unpin for SaveResidualsEvery
impl UnsafeUnpin for SaveResidualsEvery
impl UnwindSafe for SaveResidualsEvery
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> 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