This commit is contained in:
froejdh_e
2024-11-12 09:27:01 +01:00
parent a0b6c4cc03
commit 2ee1a5583e
9 changed files with 199 additions and 84 deletions

View File

@ -62,32 +62,28 @@ class RawFile : public FileInterface {
//TODO! do we need to adapt the API?
void read_into(std::byte *image_buf, DetectorHeader *header);
void read_into(std::byte *image_buf, size_t n_frames, DetectorHeader *header);
size_t frame_number(size_t frame_index) override;
size_t bytes_per_frame() override;
size_t pixels_per_frame() override;
size_t bytes_per_pixel() const;
void seek(size_t frame_index) override;
size_t tell() override;
size_t total_frames() const override;
size_t rows() const override;
size_t cols() const override;
size_t bitdepth() const override;
size_t bytes_per_pixel() const;
xy geometry();
size_t n_mod() const;
RawMasterFile master() const;
DetectorType detector_type() const override;
private:
/**
* @brief check if the file is a master file
* @param fpath path to the file
*/
static bool is_master_file(const std::filesystem::path &fpath);
// TODO! Deal with fast quad and missing files
/**
* @brief read the frame at the given frame index into the image buffer

View File

@ -56,6 +56,7 @@ class ScanParameters {
int step() const;
const std::string &dac() const;
bool enabled() const;
void increment_stop();
};
@ -67,7 +68,7 @@ struct ROI{
size_t height() const { return ymax - ymin; }
size_t width() const { return xmax - xmin; }
};
}__attribute__((packed));
/**
* @brief Class for parsing a master file either in our .json format or the old