mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-21 11:17:58 +02:00
prefixed members rows and cols with m_ to avoid -Wshadow
This commit is contained in:
@ -1,35 +1,37 @@
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <sys/types.h>
|
||||
#include <cstdint>
|
||||
#include <bits/unique_ptr.h>
|
||||
#include <vector>
|
||||
#include "aare/defs.hpp"
|
||||
|
||||
|
||||
#include <bits/unique_ptr.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <sys/types.h>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
* @brief Frame class to represent a single frame of data
|
||||
* model class
|
||||
* should be able to work with streams coming from files or network
|
||||
*/
|
||||
*/
|
||||
|
||||
template <class DataType> class Frame {
|
||||
ssize_t m_rows;
|
||||
ssize_t m_cols;
|
||||
DataType *m_data;
|
||||
ssize_t m_bitdepth = sizeof(DataType) * 8;
|
||||
|
||||
template <class DataType> class Frame{
|
||||
|
||||
public:
|
||||
ssize_t rows;
|
||||
ssize_t cols;
|
||||
DataType* data;
|
||||
ssize_t bitdepth = sizeof(DataType)*8;
|
||||
|
||||
Frame(std::byte* fp, ssize_t rows, ssize_t cols);
|
||||
public:
|
||||
Frame(std::byte *fp, ssize_t rows, ssize_t cols);
|
||||
DataType get(int row, int col);
|
||||
|
||||
~Frame(){
|
||||
delete[] data;
|
||||
ssize_t rows() const{
|
||||
return m_rows;
|
||||
}
|
||||
ssize_t cols() const{
|
||||
return m_cols;
|
||||
}
|
||||
ssize_t bitdepth() const{
|
||||
return m_bitdepth;
|
||||
}
|
||||
|
||||
~Frame() { delete[] m_data; }
|
||||
};
|
||||
|
||||
typedef Frame<uint16_t> Frame16;
|
||||
|
Reference in New Issue
Block a user