174 return *const_cast<Channel*>(
this) =
const_cast<Channel<T>&
>(other);
231 template<
class Vec2D>
233 float fX0 = p[0] - floor(p[0]), fX1 = 1.0 - fX0;
234 float fY0 = p[1] - floor(p[1]), fY1 = 1.0 - fY0;
235 const T* pLL = &
operator()((
int)p[0],(
int)p[1]);
241 return fX1 * (fY1*a + fY0*c) + fX0 * (fY1*b + fY0*d);
350 template<
class OtherT>
376 #define ICL_INSTANTIATE_DEPTH(D) typedef Channel<icl##D> Channel##D; 378 #undef ICL_INSTANTIATE_DEPTH const utils::Rect & getROI() const
returns the channel ROI
Definition: Channel.h:315
undocument this line if you encounter any issues!
Definition: Any.h:37
utils::Size m_size
Definition: Channel.h:147
utils::Point getROIOffset() const
returns the channel ROI offset
Definition: Channel.h:318
T & operator[](int idx)
working function for linear pixel array access ( not const version)
Definition: Channel.h:213
void convert(Channel< OtherT > &other) const
deeply converts the channel data (no roi support here)
Definition: Channel.h:351
#define ICL_INSTANTIATE_ALL_DEPTHS
Definition: Macros.h:175
int getROIYOffset() const
returns the channel ROI Y-Offset
Definition: Channel.h:333
int getDim() const
returns the wrapped images dim = width*height
Definition: Channel.h:312
T & operator()(int x, int y)
main working function: returns a reference to the pixel at position (x,y)
Definition: Channel.h:183
const T * const_iterator
const iterator type (just a const pointer)
Definition: Channel.h:248
ICLQt_API ImgROI roi(ImgQ &r)
creates a ROI-struct from an image
Channel(const T *data, const utils::Size &size, const utils::Rect &roi)
private constructor
Definition: Channel.h:367
const utils::Size & getSize() const
retusn the wrapped images size
Definition: Channel.h:308
T * m_data
Definition: Channel.h:146
Channel()
Empty constructor (create an invalid Channel object)
Definition: Channel.h:154
void deepCopy(Channel< T > &other) const
deeply copies the channel data (no roi support here)
Definition: Channel.h:342
const Channel< T > & operator=(const Channel< T > &other) const
assign operator (also for const channels)
Definition: Channel.h:173
Channel(T *data, const utils::Size &size, const utils::Rect &roi)
Definition: Channel.h:370
int getHeight() const
returns the wrapped images height
Definition: Channel.h:305
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
utils::Rect m_roi
Definition: Channel.h:148
int getROIHeight() const
returns the channel ROI height
Definition: Channel.h:327
Point ul() const
returns upper left point of the rect
Definition: Rect.h:290
roi_iterator endROI()
returns the end-iterator for an images ROI
Definition: Channel.h:288
const_roi_iterator beginROI() const
returns the iterator for an images ROI (const)
Definition: Channel.h:282
Iterator class used to iterate through an Images ROI-pixels.
Definition: ImgIterator.h:242
void redefineROI(const utils::Rect &newROI) const
Sets a new ROI to this image channel (this does not affect the underlying images ROI)
Definition: Channel.h:337
Size getSize() const
returns the size of the rect
Definition: Rect.h:324
Size class of the ICL.
Definition: Size.h:61
Utility helper class for faster and more convenient access to single channel image data.
Definition: Channel.h:145
const_roi_iterator endROI() const
returns the end-iterator for an images ROI (const)
Definition: Channel.h:293
iterator end()
returns the image end-iterator (equal to getData(channel)+getDim())
Definition: Channel.h:267
int getWidth() const
returns the wrapped images width
Definition: Channel.h:301
int getROIWidth() const
returns the channel ROI width
Definition: Channel.h:324
T & operator()(const utils::Point &p)
convenience function for point-based index access
Definition: Channel.h:189
ImgIterator< T > roi_iterator
type definition for ROI iterator
Definition: Channel.h:251
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
const ImgIterator< T > const_roi_iterator
type definition for a const ROI iterator
Definition: Channel.h:254
const_iterator begin() const
returns the image iterator (equal to getData(channel)) (const)
Definition: Channel.h:262
Channel< T > & operator=(Channel< T > &other)
assignmet operator
Definition: Channel.h:162
const_iterator end() const
returns the image end-iterator (const)
Definition: Channel.h:272
const T & operator()(int x, int y) const
main working function: returns const a reference to the pixel at position (x,y)
Definition: Channel.h:205
Base class for Exception handling in the ICL.
Definition: Exception.h:42
iterator begin()
returns the image iterator (equal to getData(channel))
Definition: Channel.h:257
void convert(const srcT *poSrcStart, const srcT *poSrcEnd, dstT *poDst)
moves value from source to destination array (with casting on demand)
Definition: CoreFunctions.h:252
const T & operator[](int idx) const
working function for linear pixel array access (const version)
Definition: Channel.h:221
Channel(const Channel &other)
Copy an image channel (this could be exploited to violate const concept)
Definition: Channel.h:157
int getDim() const
reutrns width*height
Definition: Size.h:211
void copy(const T *src, const T *srcEnd, T *dst)
moves data from source to destination array (no casting possible)
Definition: CoreFunctions.h:216
utils::Size getROISize() const
returns the channel ROI size
Definition: Channel.h:321
Rectangle class of the ICL used e.g. for the Images ROI-rect.
Definition: Rect.h:95
const T & operator()(const utils::Point &p) const
convenience function for point-based index access (const)
Definition: Channel.h:195
int getROIXOffset() const
returns the channel ROI X-Offset
Definition: Channel.h:330
The Img class implements the ImgBase Image interface with type specific functionalities .
Definition: Img.h:49
bool isNull() const
Definition: Channel.h:297
static const ImgIterator< Type > create_end_roi_iterator(const Type *data, int width, const utils::Rect &roi)
Definition: ImgIterator.h:245
roi_iterator beginROI()
returns the iterator for an images ROI
Definition: Channel.h:277
T operator()(const Vec2D &p) const
index operator with linear interpolation
Definition: Channel.h:232
T * iterator
typedef for a normal iterator (just a pointer)
Definition: Channel.h:245