v1.0.0-rc.123 (#30)
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m22s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m30s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m41s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m32s
Build Packages / Generate python client (push) Successful in 18s
Build Packages / Build documentation (push) Successful in 54s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m44s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m53s
Build Packages / build:rpm (rocky8) (push) Successful in 9m40s
Build Packages / build:rpm (rocky9) (push) Successful in 10m37s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m54s
Build Packages / Unit tests (push) Successful in 1h6m33s

This is an UNSTABLE release.

* jfjoch_broker: Use newer version of Google Ceres for (potential) CUDA 13 compatibility
* jfjoch_broker: Improve performance of generating preview images, especially for large detectors (9M-16M)
* jfjoch_viewer: Improve performance of displaying images, especially for large detectors (9M-16M)
* jfjoch_viewer: Add more color schemes for better image readability
* HDF5: Common mutex for reading and writing HDF5 if both operations were to happen in the same executable
* HDF5: suppress warning if path (upstream group) doesn't exists when checking if leaf exists

Reviewed-on: #30
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 #30.
This commit is contained in:
2026-01-30 13:43:09 +01:00
committed by leonarski_f
parent 27496b8207
commit 1c4dfd03e2
146 changed files with 401 additions and 229 deletions
+25 -10
View File
@@ -46,7 +46,6 @@ void PreviewImage::spot(std::vector<rgb> &ret, int64_t in_xpixel, int64_t in_ypi
void PreviewImage::roi(std::vector<rgb> &ret, int64_t in_xpixel, int64_t in_ypixel, int64_t roi_number) const {
color_pixel(ret, in_xpixel, in_ypixel, plotly[roi_number % 10]);
}
template<class T>
std::vector<rgb> PreviewImage::GenerateRGB(const uint8_t *value_8,
int64_t special_value_64,
@@ -87,16 +86,32 @@ std::vector<rgb> PreviewImage::GenerateRGB(const uint8_t *value_8,
}
// LUT-based mapping (fast path)
const auto &lut = scale.LUTData();
const int64_t lut_size = static_cast<int64_t>(lut.size());
const float lut_scale = static_cast<float>(lut_size - 1);
const float inv_range = (foreground > background)
? (lut_scale / (foreground - background))
: 0.0f;
const rgb gap_color = scale.Apply(ColorScaleSpecial::Gap);
const rgb bad_color = scale.Apply(ColorScaleSpecial::BadPixel);
std::vector<rgb> ret(xpixel * ypixel);
for (int i = 0; i < xpixel*ypixel; i++) {
if (mask[i] == MaskGap)
ret[i] = scale.Apply(ColorScaleSpecial::Gap);
else if ((value[i] == special_value)
|| (mask[i] == MaskDet)
|| (settings.show_user_mask && (mask[i] == MaskUsr))) {
ret[i] = scale.Apply(ColorScaleSpecial::BadPixel);
} else
ret[i] = scale.Apply(value[i], background, foreground);
for (int i = 0; i < xpixel * ypixel; i++) {
if (mask[i] == MaskGap) {
ret[i] = gap_color;
} else if ((value[i] == special_value)
|| (mask[i] == MaskDet)
|| (settings.show_user_mask && (mask[i] == MaskUsr))) {
ret[i] = bad_color;
} else {
const float v = static_cast<float>(value[i]);
int64_t idx = static_cast<int64_t>((v - background) * inv_range + 0.5f);
if (idx < 0) idx = 0;
else if (idx >= lut_size) idx = lut_size - 1;
ret[i] = lut[idx];
}
}
return ret;
}