jfjoch_viewer: Add calibration viewer (WIP)

This commit is contained in:
2025-11-06 16:11:22 +01:00
parent 003e2f0a8e
commit ff4103fcc5
2 changed files with 5 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ This is an UNSTABLE release and not recommended for production use (please use r
* jfjoch_broker: Refactor of calibration logic for more clear code (likely to introduce problems)
* jfjoch_viewer: Add option to handle user pixel mask (experimental)
* jfjoch_viewer: More options for ROI
* jfjoch_viewer: Add window to display calibration
## 1.0.0-rc.96
This is an UNSTABLE release.

View File

@@ -115,7 +115,7 @@ TEST_CASE("JFJochReader_MasterFile_Calibration", "[HDF5][Full]") {
CHECK(dataset->calibration_data[2] == "cf");
std::vector<uint8_t> buffer;
std::vector<uint8_t> buff_2;
REQUIRE_THROWS(reader.ReadCalibration(buffer, "c3"));
CompressedImage test;
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "c1"));
@@ -123,18 +123,21 @@ TEST_CASE("JFJochReader_MasterFile_Calibration", "[HDF5][Full]") {
CHECK(test.GetHeight() == 200);
CHECK(test.GetWidth() == 300);
CHECK(test.GetMode() == CompressedImageMode::Uint16);
CHECK(reinterpret_cast<const uint16_t *>(test.GetUncompressedPtr(buff_2))[76] == 10);
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "c2"));
CHECK(test.GetByteDepth() == 4);
CHECK(test.GetHeight() == 100);
CHECK(test.GetWidth() == 400);
CHECK(test.GetMode() == CompressedImageMode::Int32);
CHECK(reinterpret_cast<const int32_t *>(test.GetUncompressedPtr(buff_2))[76] == 55);
REQUIRE_NOTHROW(test = reader.ReadCalibration(buffer, "cf"));
CHECK(test.GetByteDepth() == 4);
CHECK(test.GetHeight() == 100);
CHECK(test.GetWidth() == 400);
CHECK(test.GetMode() == CompressedImageMode::Float32);
CHECK(reinterpret_cast<const float *>(test.GetUncompressedPtr(buff_2))[76] == Catch::Approx(1234.56f));
}
remove("test_reader_calibration_master.h5");