mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-10 02:02:03 +02:00
get rx_roi from metadata from rxr, cant reconstruct. fixed clear roi should give 1 roi min
This commit is contained in:
@@ -1675,18 +1675,14 @@ std::vector<defs::ROI> DetectorImpl::getRxROI(int module_id) const {
|
||||
if (modules.size() == 0) {
|
||||
throw RuntimeError("No Modules added");
|
||||
}
|
||||
|
||||
// individual module rois
|
||||
if (module_id >= (int)modules.size()) {
|
||||
throw RuntimeError("Invalid module id: " + std::to_string(module_id));
|
||||
}
|
||||
if (module_id >= 0) {
|
||||
if (module_id >= (int)modules.size())
|
||||
throw RuntimeError("Invalid module index " + std::to_string(module_id) + ". Out of bounds.");
|
||||
return modules[module_id]->getRxROI();
|
||||
}
|
||||
|
||||
// multi roi
|
||||
// return std::vector<defs::ROI>{};
|
||||
return rxRoiTemp;
|
||||
// TODO
|
||||
return modules[0]->getRxROIMetadata();
|
||||
}
|
||||
|
||||
void DetectorImpl::validateROIs(const std::vector<defs::ROI> &rois) {
|
||||
@@ -1875,17 +1871,16 @@ void DetectorImpl::setRxROI(const std::vector<defs::ROI> &args) {
|
||||
}
|
||||
modules[iModule]->setRxROI(portRois);
|
||||
}
|
||||
rxRoiTemp = args;
|
||||
// metadata
|
||||
modules[0]->setRxROIMetadata(args);
|
||||
}
|
||||
|
||||
void DetectorImpl::clearRxROI() {
|
||||
rxRoiTemp.clear();
|
||||
int nPortsPerModule = Parallel(&Module::getNumberofUDPInterfacesFromShm, {}).tsquash("Inconsistent number of udp ports set up per module");
|
||||
for (size_t iModule = 0; iModule < modules.size(); ++iModule) {
|
||||
modules[iModule]->setRxROI(std::vector<defs::ROI>(nPortsPerModule));
|
||||
}
|
||||
modules[0]->setRxROIMetadata(std::vector<defs::ROI>(1));
|
||||
}
|
||||
|
||||
void DetectorImpl::getBadChannels(const std::string &fname,
|
||||
|
||||
Reference in New Issue
Block a user