v1.0.0-rc.96 (#1)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m47s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m20s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m13s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m10s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 7m53s
Build Packages / build:rpm (rocky8) (push) Successful in 7m57s
Build Packages / Generate python client (push) Successful in 13s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m39s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 36s
Build Packages / build:rpm (rocky9) (push) Successful in 9m0s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m55s
Build Packages / Unit tests (push) Successful in 1h10m44s

This is an UNSTABLE release.

* Fixes in CI pipeline
* jfjoch_broker: Remove PNG preview, no dependency on libpng
* jfjoch_writer: Fix UTC timestamp being generated wrong (mix between milli- and microseconds)
* jfjoch_viewer: Show data collection time in dataset tooltip
* jfjoch_viewer: Allow to choose the calibrant (presets for LaB6 and silver behenate)
* jfjoch_viewer: Auto foreground value
* Use external libjpeg-turbo and libtiff: simpler build stack, these are built and linked statically in automated Docker builds
* Remove OpenBLAS dependency

Reviewed-on: #1
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 #1.
This commit is contained in:
2025-11-02 13:45:57 +01:00
committed by leonarski_f
parent effe97a970
commit 8b356a7001
181 changed files with 861 additions and 869 deletions
+34 -4
View File
@@ -75,6 +75,8 @@ void JFJochReaderImage::ProcessInputImage(const void *data, size_t npixel, int64
size_t good_pixel = 0;
valid_pixel.reserve(image.size());
for (int i = 0; i < npixel; i++) {
int32_t val;
if (img_ptr[i] <= INT32_MAX)
@@ -100,9 +102,27 @@ void JFJochReaderImage::ProcessInputImage(const void *data, size_t npixel, int64
} else {
good_pixel++;
image[i] = val;
valid_pixel.emplace(val, i);
valid_pixel.emplace_back(std::make_pair(val, i));
}
}
// Sort based on the first element only
std::sort(valid_pixel.begin(), valid_pixel.end(),
[](const auto& a, const auto& b) {return a.first < b.first;});
CalcAutoContrast();
}
void JFJochReaderImage::CalcAutoContrast() {
if (valid_pixel.empty())
auto_foreground = 10;
else {
auto it = valid_pixel.crbegin();
const auto index = static_cast<size_t>(valid_pixel.size() * auto_foreground_range);
std::advance(it, std::max<size_t>(1ULL, index) - 1);
auto_foreground = std::max(1, it->first);
}
}
const DataMessage &JFJochReaderImage::ImageData() const {
@@ -125,7 +145,7 @@ const std::unordered_set<int64_t> &JFJochReaderImage::ErrorPixels() const {
return error_pixel;
}
const std::map<int32_t, int32_t> &JFJochReaderImage::ValidPixels() const {
const std::vector<std::pair<int32_t, int32_t>> &JFJochReaderImage::ValidPixels() const {
return valid_pixel;
}
@@ -149,7 +169,7 @@ void JFJochReaderImage::AddImage(const JFJochReaderImage &other) {
error_pixel.clear();
saturated_pixel.clear();
valid_pixel.clear();
valid_pixel.reserve(image.size());
for (int i = 0; i < image.size(); i++) {
if (image[i] == GAP_PXL_VALUE || other.image[i] == GAP_PXL_VALUE)
image[i] = GAP_PXL_VALUE;
@@ -169,10 +189,16 @@ void JFJochReaderImage::AddImage(const JFJochReaderImage &other) {
saturated_pixel.emplace(i);
} else {
image[i] = static_cast<int32_t>(sum);
valid_pixel.emplace(sum, i);
valid_pixel.emplace_back(std::make_pair(sum, i));
}
}
}
// Sort based on the first element only
std::sort(valid_pixel.begin(), valid_pixel.end(),
[](const auto& a, const auto& b) { return a.first < b.first; });
CalcAutoContrast();
}
void JFJochReaderImage::CalcROI(const ROIElement *input) {
@@ -247,3 +273,7 @@ std::shared_ptr<JFJochReaderDataset> JFJochReaderImage::CreateMutableDataset() {
dataset = new_dataset;
return new_dataset;
}
int32_t JFJochReaderImage::GetAutoContrastValue() const {
return auto_foreground;
}