1#ifndef INCLUDE_TINYURDF_CORE_IMAGE_H_
2#define INCLUDE_TINYURDF_CORE_IMAGE_H_
6#include <loguru/loguru.hpp>
16template <
typename T =
double, std::
size_t Channels = 4>
48 const T*
data() const noexcept;
51 std::
size_t width() const;
54 std::
size_t height() const;
57 constexpr std::
size_t channels() const;
60 constexpr std::
size_t size() const;
63 T& operator[](std::
size_t offset);
66 const T& operator[](std::
size_t offset) const;
74 std::vector<T> m_data;
base image class definition
Definition image.h:18
constexpr std::size_t size() const
Get the size of the data array containing the image.
Definition image.cc:48
T value_type
Alias for the type used to represent individual pixel values.
Definition image.h:21
T * data() noexcept
get direct access to the underlying data
Definition image.cc:28
constexpr std::size_t channels() const
Get the number of channels in the image.
Definition image.cc:43
Image()
Default-construct a new image object.
Definition image.cc:4
std::size_t width() const
Get the width of the image.
Definition image.cc:33
std::size_t height() const
Get the height of the image.
Definition image.cc:38