Class to read a subfile from a RawFile.
More...
#include <SubFile.hpp>
|
using | pfunc = size_t(SubFile::*)(std::byte *) |
| type of the read_impl function pointer
|
|
Class to read a subfile from a RawFile.
◆ pfunc
type of the read_impl function pointer
- Parameters
-
buffer | pointer to the buffer to read the data into |
- Returns
- number of bytes read
◆ SubFile()
aare::SubFile::SubFile |
( |
std::filesystem::path |
fname, |
|
|
DetectorType |
detector, |
|
|
ssize_t |
rows, |
|
|
ssize_t |
cols, |
|
|
uint16_t |
bitdepth |
|
) |
| |
SubFile constructor.
- Parameters
-
fname | path to the subfile |
detector | detector type |
rows | number of rows in the subfile |
cols | number of columns in the subfile |
bitdepth | bitdepth of the subfile |
- Exceptions
-
std::invalid_argument | if the detector,type pair is not supported |
◆ bytes_per_part()
size_t aare::SubFile::bytes_per_part |
( |
| ) |
|
|
inline |
◆ frame_number()
size_t aare::SubFile::frame_number |
( |
int |
frame_index | ) |
|
◆ get_part()
size_t aare::SubFile::get_part |
( |
std::byte * |
buffer, |
|
|
int |
frame_number |
|
) |
| |
read the subfile into a buffer with the bytes reordered and flipped
- Parameters
-
buffer | pointer to the buffer to read the data into |
frame_number | frame number to read |
- Returns
- number of bytes read
◆ pixels_per_part()
size_t aare::SubFile::pixels_per_part |
( |
| ) |
|
|
inline |
◆ read_impl_flip()
template<typename DataType >
size_t aare::SubFile::read_impl_flip |
( |
std::byte * |
buffer | ) |
|
read the subfile into a buffer with the bytes flipped
- Parameters
-
buffer | pointer to the buffer to read the data into |
- Returns
- number of bytes read
◆ read_impl_normal()
size_t aare::SubFile::read_impl_normal |
( |
std::byte * |
buffer | ) |
|
read the subfile into a buffer
- Parameters
-
buffer | pointer to the buffer to read the data into |
- Returns
- number of bytes read
◆ read_impl_reorder()
template<typename DataType >
size_t aare::SubFile::read_impl_reorder |
( |
std::byte * |
buffer | ) |
|
read the subfile into a buffer with the bytes reordered
- Parameters
-
buffer | pointer to the buffer to read the data into |
- Returns
- number of bytes read
◆ fp
FILE* aare::SubFile::fp = nullptr |
|
protected |
◆ m_bitdepth
ssize_t aare::SubFile::m_bitdepth |
|
protected |
◆ m_cols
ssize_t aare::SubFile::m_cols {} |
|
protected |
◆ m_fname
std::filesystem::path aare::SubFile::m_fname |
|
protected |
◆ m_rows
ssize_t aare::SubFile::m_rows {} |
|
protected |
◆ m_sub_file_index_
int aare::SubFile::m_sub_file_index_ {} |
|
protected |
◆ n_frames
ssize_t aare::SubFile::n_frames {} |
|
protected |
◆ read_impl
pfunc aare::SubFile::read_impl = nullptr |
|
protected |
◆ read_impl_map
Initial value:= {
}
size_t read_impl_normal(std::byte *buffer)
read the subfile into a buffer
Definition SubFile.cpp:40
map to store the read_impl functions for different detectors
- Note
- the key is a pair of DetectorType and bitdepth
-
the value is a pointer to the read_impl function specific for the detector
-
the read_impl function will be set to the appropriate function in the constructor
The documentation for this class was generated from the following files: