75de40f52b
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m27s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m20s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m35s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 5m59s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 7m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 8m30s
Build Packages / build:rpm (rocky8) (push) Successful in 7m39s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m16s
Build Packages / build:rpm (rocky9) (push) Successful in 9m35s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m6s
Build Packages / Generate python client (push) Successful in 12s
Build Packages / Build documentation (push) Successful in 31s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 7m6s
Build Packages / DIALS test (push) Successful in 12m3s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m11s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 5m50s
Build Packages / Unit tests (push) Successful in 57m33s
This is an UNSTABLE release. The release has significant modifications for data processing - in case of troubles go back to 1.0.0-rc.144. * jfjoch_viewer: Add reciprocal space viewer * jfjoch_process: Two pass algorithm that does spot finding/indexing + integration of full dataset * jfjoch_process: Improve logic for rotation indexer, to make execution more deterministic (still work in progress) Reviewed-on: #57 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
59 lines
2.0 KiB
C++
59 lines
2.0 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCHIMAGEREADER_H
|
|
#define JFJOCHIMAGEREADER_H
|
|
|
|
#include <unordered_set>
|
|
#include <map>
|
|
#include <mutex>
|
|
|
|
#include "../common/JFJochMessages.h"
|
|
#include "../common/Plot.h"
|
|
#include "../common/ROIBox.h"
|
|
#include "../common/DiffractionExperiment.h"
|
|
#include "JFJochReaderDataset.h"
|
|
#include "JFJochReaderImage.h"
|
|
#include "JFJochReaderSpots.h"
|
|
|
|
class JFJochReader {
|
|
mutable std::mutex m;
|
|
std::shared_ptr<JFJochReaderDataset> dataset;
|
|
|
|
virtual bool LoadImage_i(std::shared_ptr<JFJochReaderDataset> &dataset,
|
|
DataMessage& message,
|
|
std::vector<uint8_t> &buffer,
|
|
int64_t image_number,
|
|
bool update_dataset) = 0;
|
|
|
|
mutable std::mutex summation_mutex;
|
|
void SummationThread(int64_t image0,
|
|
int64_t n_image,
|
|
int64_t image_jump,
|
|
JFJochReaderImage &image);
|
|
protected:
|
|
void SetStartMessage(const std::shared_ptr<JFJochReaderDataset> &val);
|
|
DiffractionExperiment default_experiment;
|
|
public:
|
|
virtual ~JFJochReader() = default;
|
|
|
|
JFJochReader& Experiment(const DiffractionExperiment& experiment);
|
|
|
|
std::shared_ptr<const JFJochReaderDataset> GetDataset() const;
|
|
[[nodiscard]] virtual uint64_t GetNumberOfImages() const = 0;
|
|
|
|
virtual void Close() = 0;
|
|
|
|
std::shared_ptr<JFJochReaderImage> LoadImage(int64_t image_number, int64_t summation_factor = 1);
|
|
|
|
void UpdateGeomMetadata(const DiffractionExperiment& experiment);
|
|
void UpdateUserMask(const std::vector<uint32_t>& mask);
|
|
|
|
virtual std::shared_ptr<JFJochReaderRawImage> GetRawImage(int64_t image_number) = 0;
|
|
|
|
virtual std::vector<SpotToSave> ReadSpots(int64_t image) const = 0;
|
|
std::shared_ptr<JFJochReaderSpots> ReadAllSpots(int64_t start_image, int64_t end_image, int64_t stride = 1) const;
|
|
};
|
|
|
|
#endif //JFJOCHIMAGEREADER_H
|