mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-06-05 03:38:41 +02:00
Fixes #281
This commit is contained in:
@@ -194,6 +194,15 @@ ScanParameters RawMasterFile::scan_parameters() const {
|
||||
}
|
||||
|
||||
std::optional<ROI> RawMasterFile::roi() const {
|
||||
if (!m_rois) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (m_rois->empty()) {
|
||||
throw std::runtime_error(LOCATION +
|
||||
"Zero ROIs in metadata.");
|
||||
}
|
||||
|
||||
if (m_rois.value().size() > 1) {
|
||||
throw std::runtime_error(LOCATION +
|
||||
"Multiple ROIs present, use rois() method.");
|
||||
|
||||
Reference in New Issue
Block a user