20 template <
typename PixelType>
29 Image(std::vector<int>
const& dimensions);
41 void Reconstruct(std::vector<int>
const& dimensions);
47 inline std::vector<size_t>
const&
GetOffsets()
const;
49 inline std::vector<PixelType>
const&
GetPixels()
const;
50 inline std::vector<PixelType>&
GetPixels();
63 inline PixelType
const&
operator[] (
size_t i)
const;
64 PixelType&
Get(
size_t i);
65 PixelType
const&
Get(
size_t i)
const;
74 template <
typename PixelType>
79 template <
typename PixelType>
84 template <
typename PixelType>
90 template <
typename PixelType>
96 template <
typename PixelType>
105 template <
typename PixelType>
108 *
this = std::move(
image);
111 template <
typename PixelType>
120 template <
typename PixelType>
127 if (dimensions.size() > 0)
129 for (
auto dim : dimensions)
140 size_t numPixels = 1;
141 for (
size_t d = 0; d < dimensions.size(); ++d)
147 for (
size_t d = 1; d < dimensions.size(); ++d)
156 template <
typename PixelType>
inline 162 template <
typename PixelType>
inline 168 template <
typename PixelType>
inline 174 template <
typename PixelType>
inline 180 template <
typename PixelType>
inline 186 template <
typename PixelType>
inline 192 template <
typename PixelType>
inline 198 template <
typename PixelType>
inline 204 template <
typename PixelType>
208 int const numDimensions =
static_cast<int>(
mDimensions.size());
209 size_t index = coord[0];
210 for (
int d = 1; d < numDimensions; ++d)
217 template <
typename PixelType>
221 int const numDimensions =
static_cast<int>(
mDimensions.size());
222 for (
int d = 0; d < numDimensions; ++d)
229 template <
typename PixelType>
inline 235 template <
typename PixelType>
inline 241 template <
typename PixelType>
247 template <
typename PixelType>
std::vector< int > mDimensions
Image & operator=(Image const &image)
int GetDimension(int d) const
GLenum GLenum GLsizei void * image
size_t GetOffset(int d) const
std::vector< size_t > mOffsets
size_t GetIndex(int const *coord) const
size_t GetNumPixels() const
std::vector< int > const & GetDimensions() const
std::vector< PixelType > const & GetPixels() const
void Reconstruct(std::vector< int > const &dimensions)
void GetCoordinates(size_t index, int *coord) const
int GetNumDimensions() const
PixelType & operator[](size_t i)
PixelType & Get(size_t i)
std::vector< PixelType > mPixels
std::vector< size_t > const & GetOffsets() const