31#ifndef IMAGETEMPLATE_H_
32#define IMAGETEMPLATE_H_ "Image 1.3, 2010.05.05 Markus.Peura@fmi.fi"
59template <
class T=
unsigned char>
72 ImageT(
size_t width,
size_t height,
size_t channelCount=1,
size_t alphaChannelCount=0){
73 initialize(
typeid(T), width,height,channelCount,alphaChannelCount);
78 initialize(
typeid(T), image.getWidth(),image.getHeight(),image.getImageChannelCount(),image.getAlphaChannelCount());
86 const T & at(
size_t i)
const {
87 return *retrieve<const T>(
address(i));
93 return *retrieve<T>(
address(i));
99 const T & at(
size_t i,
size_t j)
const {
100 return *(
const T *) retrieve<T>(
address(i,j));
105 T & at(
size_t i,
size_t j){
106 return *(T *) retrieve<T>(
address(i,j));
size_t address(size_t i) const
Computes the index location from image coordinates. Does not involve bit resolution.
Definition ImageFrame.h:143
const CoordinatePolicy & getCoordinatePolicy() const
Coord policy.
Definition ImageLike.h:174
A template class for images with static storage type.
Definition ImageT.h:61
Image with modifiable geometry.
Definition Image.h:53
virtual void initialize(const std::type_info &t, const Geometry &g)
Sets the type and allocates a data buffer.
Definition Image.h:139
Definition DataSelector.cpp:1277