mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 00:37:13 +02:00
better file structure for better separation
This commit is contained in:
@ -5,8 +5,6 @@
|
||||
|
||||
add_library(core "${CMAKE_CURRENT_SOURCE_DIR}/Frame.cpp")
|
||||
|
||||
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
target_link_libraries(core PUBLIC common)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "Frame.hpp"
|
||||
#include "core/Frame.hpp"
|
||||
#include <iostream>
|
||||
|
||||
template <typename DataType>
|
||||
|
@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <sys/types.h>
|
||||
#include <cstdint>
|
||||
#include <bits/unique_ptr.h>
|
||||
#include <vector>
|
||||
#include "common/defs.hpp"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @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{
|
||||
|
||||
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);
|
||||
DataType get(int row, int col);
|
||||
|
||||
~Frame(){
|
||||
delete[] data;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
typedef Frame<uint16_t> Frame16;
|
||||
typedef Frame<uint8_t> Frame8;
|
||||
typedef Frame<uint32_t> Frame32;
|
Reference in New Issue
Block a user