ImagePreprocessor: Simplify a lot the class

This commit is contained in:
2026-04-22 13:14:24 +02:00
parent 5695846756
commit d0446b453b
6 changed files with 86 additions and 122 deletions
@@ -28,20 +28,22 @@ protected:
std::vector<float> azint_sum;
std::vector<float> azint_sum2;
std::vector<uint32_t> azint_count;
std::vector<int32_t> processed_image;
std::vector<int32_t> &processed_image;
std::vector<bool> mask_1bit;
uint16_t azint_bins;
const int64_t saturation_limit;
template <class T> ImageStatistics Analyze(const uint8_t *input, T err_value, T sat_value);
public:
ImagePreprocessor(const DiffractionExperiment &experiment, const AzimuthalIntegration &integration, const PixelMask &mask);
ImagePreprocessor(const DiffractionExperiment &experiment,
const AzimuthalIntegration &integration,
const PixelMask &mask,
std::vector<int32_t> &processed_image);
virtual ~ImagePreprocessor() = default;
virtual ImageStatistics Analyze(const uint8_t *decompressed_image, CompressedImageMode image_mode) = 0;
[[nodiscard]] const std::vector<int32_t> &GetProcessedImage() const;
ImageStatistics Analyze(const uint8_t *decompressed_image, CompressedImageMode image_mode);
void Update(AzimuthalIntegrationProfile &profile) const;
};