v1.0.0-rc.101 (#6)
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m48s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m18s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m18s
Build Packages / build:rpm (rocky8) (push) Successful in 11m43s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m31s
Build Packages / Unit tests (push) Has been skipped
Build Packages / Generate python client (push) Successful in 17s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m2s
Build Packages / Build documentation (push) Successful in 37s
Build Packages / build:rpm (rocky9) (push) Successful in 9m45s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m35s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m8s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m48s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m18s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m18s
Build Packages / build:rpm (rocky8) (push) Successful in 11m43s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m31s
Build Packages / Unit tests (push) Has been skipped
Build Packages / Generate python client (push) Successful in 17s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m2s
Build Packages / Build documentation (push) Successful in 37s
Build Packages / build:rpm (rocky9) (push) Successful in 9m45s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m35s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m8s
This is an UNSTABLE release. * jfjoch_viewer: Auto load is better handling change of states * jfjoch_viewer: Fix DBus registration * jfjoch_viewer: Handle charts better with vertical lines on hover and status bar update * jfjoch_viewer: Calculate ROI in a more efficient way Reviewed-on: #6 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #6.
This commit is contained in:
@@ -23,8 +23,7 @@ JFJochReaderImage::JFJochReaderImage(const JFJochReaderImage &other)
|
||||
message(other.message),
|
||||
saturated_pixel(other.saturated_pixel),
|
||||
error_pixel(other.error_pixel),
|
||||
valid_pixel(other.valid_pixel),
|
||||
roi(other.roi) {
|
||||
valid_pixel(other.valid_pixel) {
|
||||
// Need to make image use local copy
|
||||
message.image = CompressedImage(image, dataset->experiment.GetXPixelsNum(),
|
||||
dataset->experiment.GetYPixelsNum());
|
||||
@@ -201,48 +200,6 @@ void JFJochReaderImage::AddImage(const JFJochReaderImage &other) {
|
||||
CalcAutoContrast();
|
||||
}
|
||||
|
||||
void JFJochReaderImage::CalcROI(const ROIElement *input) {
|
||||
std::unique_lock ul(roi_mutex);
|
||||
|
||||
if (!input) {
|
||||
roi = {};
|
||||
return;
|
||||
}
|
||||
|
||||
int64_t width = dataset->experiment.GetXPixelsNum();
|
||||
int64_t height = dataset->experiment.GetYPixelsNum();
|
||||
|
||||
int64_t roi_val = 0;
|
||||
uint64_t roi_val_2 = 0;
|
||||
int64_t roi_max = INT64_MIN;
|
||||
uint64_t roi_npixel = 0;
|
||||
|
||||
for (int64_t y = 0; y < height; y++) {
|
||||
for (int64_t x = 0; x < width; x++) {
|
||||
int32_t val = image[x + width * y];
|
||||
if (input->CheckROI(x, y, 0.0) && (val != SATURATED_PXL_VALUE)
|
||||
&& (val != ERROR_PXL_VALUE) && (val != GAP_PXL_VALUE)) {
|
||||
roi_val += val;
|
||||
roi_val_2 += val * val;
|
||||
if (val > roi_max) roi_max = val;
|
||||
roi_npixel++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
roi = ROIMessage{
|
||||
.sum = roi_val,
|
||||
.sum_square = roi_val_2,
|
||||
.max_count = roi_max,
|
||||
.pixels = roi_npixel
|
||||
};
|
||||
}
|
||||
|
||||
const std::optional<ROIMessage> &JFJochReaderImage::GetROI() const {
|
||||
std::unique_lock ul(roi_mutex);
|
||||
return roi;
|
||||
}
|
||||
|
||||
std::vector<float> JFJochReaderImage::GetAzInt1D() const {
|
||||
if (dataset->azimuthal_bins <= 1) {
|
||||
return message.az_int_profile;
|
||||
|
||||
Reference in New Issue
Block a user