1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//! A table of per-ROI raw/net counts and raw/net area over the active curve,
//! mirroring silx [`CurvesROIWidget`]: one row per curve ROI with `From` / `To`
//! / `Raw Counts` / `Net Counts` / `Raw Area` / `Net Area`, computed by the pure
//! [`curve_roi_counts`] reduction in [`crate::widget::roi_stats`].
//!
//! The rows are filled by [`PlotWidget::feed_curves_roi_stats`] /
//! [`PlotWidget::show_curves_roi_widget`] from the active item's retained curve
//! data, so the table follows the active curve and the live ROI list. Only ROIs
//! with an `x`-span (silx's 1D `from`/`to` ROIs) appear; the widget itself only
//! renders the rows it was given, so the row-building is GPU-free and unit-tested
//! via [`PlotWidget::feed_curves_roi_stats`]'s helper.
//!
//! [`CurvesROIWidget`]: https://www.silx.org/doc/silx/latest/modules/gui/plot/curvesroiwidget.html
//! [`curve_roi_counts`]: crate::widget::roi_stats::curve_roi_counts
//! [`PlotWidget::feed_curves_roi_stats`]: crate::widget::high_level::PlotWidget::feed_curves_roi_stats
//! [`PlotWidget::show_curves_roi_widget`]: crate::widget::high_level::PlotWidget::show_curves_roi_widget
use crateCurveRoiCounts;
use crateformat_stat;
/// One curve ROI's row: a display label, its inclusive `x`-span (`from`, `to`),
/// and the raw/net counts and area reduced over the active curve inside it.
/// A per-ROI curve-statistics table (silx `CurvesROIWidget`).
///
/// Holds the rows computed from the active curve + ROI list and renders them as
/// a grid: `ROI | From | To | Raw Counts | Net Counts | Raw Area | Net Area`.
/// Fill it via [`PlotWidget::feed_curves_roi_stats`] (or render+fill in one call
/// with [`PlotWidget::show_curves_roi_widget`]); [`Self::ui`] draws the current
/// rows.
///
/// [`PlotWidget::feed_curves_roi_stats`]: crate::widget::high_level::PlotWidget::feed_curves_roi_stats
/// [`PlotWidget::show_curves_roi_widget`]: crate::widget::high_level::PlotWidget::show_curves_roi_widget