All checks were successful
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>
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCHHDF5IMAGEREADER_H
|
|
#define JFJOCHHDF5IMAGEREADER_H
|
|
|
|
#include "JFJochReader.h"
|
|
#include "../writer/HDF5Objects.h"
|
|
|
|
class JFJochHDF5Reader : public JFJochReader {
|
|
std::unique_ptr<HDF5ReadOnlyFile> master_file;
|
|
|
|
std::vector<std::string> legacy_format_files;
|
|
|
|
bool legacy_format = false;
|
|
size_t images_per_file = 1;
|
|
size_t number_of_images = 0;
|
|
|
|
bool LoadImage_i(std::shared_ptr<JFJochReaderDataset> &dataset,
|
|
DataMessage& message,
|
|
std::vector<uint8_t> &buffer,
|
|
int64_t image_number,
|
|
bool update_dataset) override;
|
|
|
|
CompressedImage LoadImageDataset(std::vector<uint8_t> &tmp, HDF5Object &file, hsize_t number);
|
|
|
|
template <class T>
|
|
void ReadVector(std::vector<T> &v,
|
|
HDF5Object &file,
|
|
const std::string &dataset_name,
|
|
size_t image0,
|
|
size_t nimages);
|
|
|
|
std::optional<GoniometerAxis> ReadAxis(HDF5Object *file, const std::string &name);
|
|
public:
|
|
~JFJochHDF5Reader() override = default;
|
|
|
|
void ReadFile(const std::string& filename);
|
|
|
|
uint64_t GetNumberOfImages() const override;
|
|
void Close() override;
|
|
|
|
CompressedImage ReadCalibration(std::vector<uint8_t> &tmp, const std::string &name) const;
|
|
};
|
|
|
|
|
|
#endif //JFJOCHHDF5IMAGEREADER_H
|