version 1.0.0-rc.24

This commit is contained in:
2024-11-17 14:55:09 +01:00
parent aeeae33ad9
commit adc13ff33e
361 changed files with 12513 additions and 3314 deletions
+33 -2
View File
@@ -14,6 +14,9 @@ ImageFormatSettings::ImageFormatSettings() {
geometry_transformation = true;
mask_chip_edges = true;
mask_module_edges = true;
mask_pixels_without_g0 = true;
apply_pixel_mask = false;
pedestal_g0_rms_limit = UINT16_MAX;
}
ImageFormatSettings &ImageFormatSettings::GeometryTransformed(bool input) {
@@ -45,10 +48,10 @@ ImageFormatSettings &ImageFormatSettings::JungfrauConvFactor_keV(const std::opti
ImageFormatSettings &ImageFormatSettings::BitDepthImage(const std::optional <int64_t> &input) {
if (!input.has_value() || (input.value() == 0))
bit_depth_image = {};
else if ((input.value() == 16) || (input.value() == 32))
else if ((input.value() == 16) || (input.value() == 32) || (input.value() == 8))
bit_depth_image = input.value();
else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Bit depth of 16, 32 or 0 (auto) allowed");
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Bit depth of 8, 16, 32 or 0 (auto) allowed");
return *this;
}
@@ -116,3 +119,31 @@ bool ImageFormatSettings::IsMaskModuleEdges() const {
bool ImageFormatSettings::IsMaskChipEdges() const {
return mask_chip_edges;
}
ImageFormatSettings &ImageFormatSettings::ApplyPixelMask(bool input) {
apply_pixel_mask = input;
return *this;
}
ImageFormatSettings &ImageFormatSettings::MaskPixelsWithoutG0(bool input) {
mask_pixels_without_g0 = input;
return *this;
}
bool ImageFormatSettings::IsApplyPixelMask() const {
return apply_pixel_mask;
}
bool ImageFormatSettings::IsMaskPixelsWithoutG0() const {
return mask_pixels_without_g0;
}
ImageFormatSettings &ImageFormatSettings::PedestalG0RMSLimit(float value) {
check_min("Pedestal G0 RMS limit", value, 0);
pedestal_g0_rms_limit = value;
return *this;
}
float ImageFormatSettings::GetPedestalG0RMSLimit() const {
return pedestal_g0_rms_limit;
}