Skip to main content

fpm_rs/reconstruction/
options.rs

1use serde::{Deserialize, Serialize};
2
3use super::FrameSchedule;
4
5/// Algorithm-independent execution options consumed by [`super::Runner`].
6#[derive(Clone, Debug, Serialize, Deserialize)]
7pub struct RunOptions {
8    /// Maximum number of complete passes through the frame schedule.
9    pub max_iterations: usize,
10    /// Number of acquisition frames supplied to each algorithm step; must be positive.
11    pub batch_size: usize,
12    /// Rule used to order acquisition frames independently on each iteration.
13    pub schedule: FrameSchedule,
14    /// Whether callbacks requesting frame hooks are invoked after each processed frame.
15    pub enable_frame_callbacks: bool,
16}
17
18impl Default for RunOptions {
19    fn default() -> Self {
20        Self {
21            max_iterations: 50,
22            batch_size: 1,
23            schedule: FrameSchedule::Sequential,
24            enable_frame_callbacks: false,
25        }
26    }
27}