v1.0.0-rc.41
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include "JFJochException.h"
|
||||
#include "JFJochCompressor.h"
|
||||
|
||||
PixelMask::PixelMask() = default;
|
||||
|
||||
PixelMask::PixelMask(size_t width, size_t height)
|
||||
: mask(width*height, 0) {}
|
||||
|
||||
@@ -15,6 +17,20 @@ PixelMask::PixelMask(const DiffractionExperiment &experiment)
|
||||
CalcEdgePixels(experiment);
|
||||
}
|
||||
|
||||
PixelMask::PixelMask(const std::vector<uint32_t> &in_mask) : mask(in_mask) {
|
||||
statistics.user_mask = 0;
|
||||
statistics.wrong_gain = 0;
|
||||
statistics.too_high_pedestal_rms = 0;
|
||||
for (unsigned int i : mask) {
|
||||
if (i & (1 << UserMaskedPixelBit))
|
||||
statistics.user_mask++;
|
||||
if (i & (1 << ErrorPixelBit))
|
||||
statistics.wrong_gain++;
|
||||
if (i & (1 << TooHighPedestalRMSPixelBit))
|
||||
statistics.too_high_pedestal_rms++;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t PixelMask::LoadMask(const std::vector<uint32_t> &input_mask, uint8_t bit) {
|
||||
uint32_t ret = 0;
|
||||
if (input_mask.size() != mask.size())
|
||||
|
||||
Reference in New Issue
Block a user