61 virtual std::vector<Frame>
read(
size_t n_frames) = 0;
76 virtual void read_into(std::byte *image_buf,
size_t n_frames) = 0;
119 virtual ssize_t
rows()
const = 0;
124 virtual ssize_t
cols()
const = 0;
137 auto old_pos =
tell();
151 auto old_pos =
tell();
153 std::vector<Frame> tmp =
read(n_frames);
FileInterface class to define the interface for file operations.
Definition FileInterface.hpp:33
virtual std::vector< Frame > read(size_t n_frames)=0
read n_frames from the file at the current position
std::vector< Frame > iread(size_t frame_number, size_t n_frames)
read n_frames from the file starting at the given frame number
Definition FileInterface.hpp:150
ssize_t m_bitdepth
Definition FileInterface.hpp:177
virtual ssize_t cols() const =0
get the number of columns in the file
int m_findex
Definition FileInterface.hpp:170
std::filesystem::path m_fname
Definition FileInterface.hpp:167
std::string version
Definition FileInterface.hpp:173
virtual void seek(size_t frame_number)=0
seek to the given frame number
virtual void read_into(std::byte *image_buf)=0
read one frame from the file at the current position and store it in the provided buffer
virtual void read_into(std::byte *image_buf, size_t n_frames)=0
read n_frames from the file at the current position and store them in the provided buffer
virtual void write(Frame &frame)=0
write a frame to the file
std::string m_ext
Definition FileInterface.hpp:169
virtual ~FileInterface()
Definition FileInterface.hpp:161
virtual ssize_t rows() const =0
get the number of rows in the file
virtual ssize_t bitdepth() const =0
get the bitdepth of the file
size_t m_total_frames
Definition FileInterface.hpp:171
DetectorType m_type
Definition FileInterface.hpp:174
virtual size_t pixels()=0
get the number of pixels in one frame
virtual Frame read()=0
write a vector of frames to the file
virtual size_t bytes_per_frame()=0
get the size of one frame in bytes
Frame iread(size_t frame_number)
read one frame from the file at the given frame number
Definition FileInterface.hpp:136
size_t max_frames_per_file
Definition FileInterface.hpp:172
std::string m_mode
Definition FileInterface.hpp:166
size_t current_frame
Definition FileInterface.hpp:178
virtual size_t tell()=0
get the current position of the file pointer
virtual size_t frame_number(size_t frame_index)=0
get the frame number at the given frame index
virtual size_t total_frames() const =0
get the total number of frames in the file
ssize_t m_cols
Definition FileInterface.hpp:176
std::string m_base_name
Definition FileInterface.hpp:169
ssize_t m_rows
Definition FileInterface.hpp:175
std::filesystem::path m_base_path
Definition FileInterface.hpp:168
Frame class to represent a single frame of data model class should be able to work with streams comin...
Definition CircularFifo.hpp:11
DetectorType
Definition defs.hpp:41
FileConfig structure to store the configuration of a file dtype: data type of the file rows: number o...
Definition FileInterface.hpp:17
uint64_t cols
Definition FileInterface.hpp:20
xy geometry
Definition FileInterface.hpp:21
aare::DType dtype
Definition FileInterface.hpp:18
uint64_t rows
Definition FileInterface.hpp:19
bool operator!=(const FileConfig &other) const
Definition FileInterface.hpp:25
bool operator==(const FileConfig &other) const
Definition FileInterface.hpp:22