DiffractionExperiment: Save ROI
This commit is contained in:
@@ -1202,3 +1202,31 @@ float DiffractionExperiment::GetPolarizationFactor() const {
|
||||
return dataset.rad_int_polarization_factor();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::ApplyROI(bool input) {
|
||||
internal.set_roi_apply(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::AddROIRectangle(int32_t x, int32_t y, int32_t width, int32_t height) {
|
||||
auto *tmp = internal.add_roi_rectangle();
|
||||
tmp->set_x0(x);
|
||||
tmp->set_y0(y);
|
||||
tmp->set_width(width);
|
||||
tmp->set_height(height);
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::ClearROI() {
|
||||
internal.clear_roi_rectangle();
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::GetApplyROI() const {
|
||||
return internal.roi_apply();
|
||||
}
|
||||
|
||||
void DiffractionExperiment::SetupROIFilter(ROIFilter &filter) {
|
||||
for (const auto& i: internal.roi_rectangle())
|
||||
filter.SetRectangle(i.x0(), i.y0(), i.width(), i.height());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user