mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-31 11:21:28 +01:00
Fixes #281
This commit is contained in:
1 parent
bfbb4eab05
commit
c665c0e6c6
1 file changed
+9
@@ -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