mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-09-02 23:20:43 +02:00
updated num_rois() member to take into account udp ROIs
This commit is contained in:
@@ -125,7 +125,7 @@ class RawFile : public FileInterface {
|
||||
size_t n_modules() const;
|
||||
|
||||
/**
|
||||
* @brief number of ROIs defined
|
||||
* @brief number of ROIs defined (always 1 for complete ROI)
|
||||
*/
|
||||
size_t num_rois() const;
|
||||
|
||||
|
||||
@@ -113,4 +113,19 @@ inline bool complete_ROI(const std::vector<ROI> &rois,
|
||||
}
|
||||
}
|
||||
|
||||
inline bool complete_ROI(const ROIGeometry &roi,
|
||||
const DetectorGeometry &geometry) {
|
||||
return roi.pixels_x() == geometry.pixels_x() &&
|
||||
roi.pixels_y() == geometry.pixels_y();
|
||||
}
|
||||
|
||||
inline bool complete_ROI(const std::vector<ROIGeometry> &rois,
|
||||
const DetectorGeometry &geometry) {
|
||||
if (rois.empty() or rois.size() > 1) {
|
||||
return false;
|
||||
} else {
|
||||
return complete_ROI(rois[0], geometry);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace aare
|
||||
+1
-7
@@ -448,13 +448,7 @@ xy RawFile::geometry() const {
|
||||
|
||||
size_t RawFile::n_modules() const { return m_geometry.n_modules(); };
|
||||
|
||||
size_t RawFile::num_rois() const {
|
||||
if (m_master.rois().has_value()) {
|
||||
return m_master.rois()->size();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
size_t RawFile::num_rois() const { return m_ROI_geometries.size(); }
|
||||
|
||||
const ROIGeometry &RawFile::roi_geometries(size_t roi_index) const {
|
||||
return m_ROI_geometries[roi_index];
|
||||
|
||||
Reference in New Issue
Block a user