51 #include <type_traits>
59 ZIVID_CORE_EXPORT std::string array2DToString(std::size_t width, std::size_t height);
73 template<
typename DataFormat>
127 return *(
data() + idx);
159 std::default_delete<DataFormat[]>()
164 std::size_t m_height;
165 std::shared_ptr<DataFormat> m_data;
#define ZIVID_CORE_EXPORT
Definition: CoreExport.h:57
Two-dimensional container of data
Definition: Array2D.h:75
const DataFormat * data() const
Pointer to the first data element of the array
Definition: Array2D.h:113
friend class Array2DFactory
Definition: Array2D.h:150
size_t height() const
Get the height of the array (number of rows)
Definition: Array2D.h:93
const DataFormat & operator()(size_t i, size_t j) const
Constant reference to an element given by row and column
Definition: Array2D.h:138
bool isEmpty() const
Check if the array is empty
Definition: Array2D.h:106
const DataFormat & operator()(size_t idx) const
Constant reference to an element given by a 1D linear index
Definition: Array2D.h:125
std::string toString() const
Get array information as string
Definition: Array2D.h:144
DataFormat ValueType
The type of the elements stored in the Array2D
Definition: Array2D.h:78
size_t size() const
Get the number of elements in the array
Definition: Array2D.h:100
size_t width() const
Get the width of the array (number of columns)
Definition: Array2D.h:87
Array2D()
Create an empty Array2D
Definition: Array2D.h:81
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:55
std::ostream & operator<<(std::ostream &stream, const Array2D< T > &array)
Serialize array information to a stream
Definition: Array2D.h:170