AARE
Data analysis library for PSI hybrid detectors
Loading...
Searching...
No Matches
File.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace aare {
5
11class File {
12 private:
14
15 public:
25 File(std::filesystem::path fname, std::string mode, FileConfig cfg = {});
26 void write(Frame &frame);
27 Frame read();
28 Frame iread(size_t frame_number);
29 std::vector<Frame> read(size_t n_frames);
30 void read_into(std::byte *image_buf);
31 void read_into(std::byte *image_buf, size_t n_frames);
32 size_t frame_number(size_t frame_index);
33 size_t bytes_per_frame();
34 size_t pixels();
35 void seek(size_t frame_number);
36 size_t tell() const;
37 size_t total_frames() const;
38 ssize_t rows() const;
39 ssize_t cols() const;
40 ssize_t bitdepth() const;
41
46 File(File &&other);
47
51 ~File();
52};
53
54} // namespace aare
FileInterface class to define the interface for file operations.
Definition FileInterface.hpp:33
RAII File class for reading and writing image files in various formats wrapper on a FileInterface to ...
Definition File.hpp:11
FileInterface * file_impl
Definition File.hpp:13
Definition Frame.hpp:18
Frame class to represent a single frame of data model class should be able to work with streams comin...
Definition CircularFifo.hpp:11
FileConfig structure to store the configuration of a file dtype: data type of the file rows: number o...
Definition FileInterface.hpp:17