7#include <Common/assertion.h>
20 std::size_t
numChannels(std::size_t layerIdx = 0)
const;
35 std::string&
name(std::size_t layerIdx = 0);
36 const std::string&
getName(std::size_t layerIdx = 0)
const;
65 std::vector<std::string> channelNames = {
"R",
"G",
"B"};
68 auto getLayer(std::size_t layerIdx) -> Layer&;
69 auto getLayer(std::size_t layerIdx)
const ->
const Layer&;
71 std::string m_pictureName;
72 std::vector<Layer> m_layers;
77 return m_layers.size();
82 return getLayer(layerIdx).channelNames.size();
87 m_layers.push_back(Layer{});
88 return m_layers.size() - 1;
95 layer.sizePx = {0, 0};
97 layer.channelNames.clear();
99 m_layers.push_back(layer);
100 return m_layers.size() - 1;
105 return m_pictureName;
110 return getLayer(layerIdx).name;
115 return getLayer(layerIdx).sizePx;
119 return getLayer(layerIdx).colorSpace;
124 getLayer(layerIdx).channelNames.resize(
numChannels,
"");
129 return getLayer(layerIdx).channelNames;
134 return m_pictureName;
139 return getLayer(layerIdx).name;
144 return getLayer(layerIdx).sizePx;
149 return getLayer(layerIdx).colorSpace;
154 return getLayer(layerIdx).channelNames;
157inline auto PictureMeta::getLayer(std::size_t layerIdx) -> Layer&
159 PH_ASSERT_LT(layerIdx, m_layers.size());
160 return m_layers[layerIdx];
163inline auto PictureMeta::getLayer(std::size_t layerIdx)
const ->
const Layer&
165 PH_ASSERT_LT(layerIdx, m_layers.size());
166 return m_layers[layerIdx];
EColorSpace
Definition color_enums.h:7
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19
std::span< T, EXTENT > TSpan
A contiguous sequence of objects of type T. Effectively the same as std::span.
Definition TSpan.h:12