diff --git a/reader/JFJochReaderImage.cpp b/reader/JFJochReaderImage.cpp index b1cfdc73..64adc14b 100644 --- a/reader/JFJochReaderImage.cpp +++ b/reader/JFJochReaderImage.cpp @@ -205,9 +205,11 @@ void JFJochReaderImage::CalcROI(const ROIElement *input) { std::unique_lock ul(roi_mutex); if (!input) { + roi_description = ""; roi = {}; return; } + int64_t width = dataset->experiment.GetXPixelsNum(); int64_t height = dataset->experiment.GetYPixelsNum(); @@ -228,6 +230,7 @@ void JFJochReaderImage::CalcROI(const ROIElement *input) { } } } + roi_description = input->toString(); roi = ROIMessage{ .sum = roi_val, @@ -277,3 +280,7 @@ std::shared_ptr JFJochReaderImage::CreateMutableDataset() { int32_t JFJochReaderImage::GetAutoContrastValue() const { return auto_foreground; } + +std::string JFJochReaderImage::GetROIDescription() const { + return roi_description; +} diff --git a/reader/JFJochReaderImage.h b/reader/JFJochReaderImage.h index 88b6e9f8..cb4a45a8 100644 --- a/reader/JFJochReaderImage.h +++ b/reader/JFJochReaderImage.h @@ -25,6 +25,7 @@ class JFJochReaderImage { std::unordered_set saturated_pixel; std::unordered_set error_pixel; std::vector> valid_pixel; + std::string roi_description; std::optional roi; mutable std::mutex roi_mutex; @@ -49,6 +50,8 @@ public: const JFJochReaderDataset &Dataset() const; const std::optional &GetROI() const; + std::string GetROIDescription() const; + void AddImage(const JFJochReaderImage& other); std::vector GetAzInt1D() const; std::vector GetAzInt1D_BinToQ() const;