78 for(
unsigned int i=0;i<
data.size();++i){
79 this->m_data[i] =
data[i].get()+offs;
94 for(
unsigned int i=0;i<
m_data.size();++i){
103 for(
unsigned int i=0;i<
m_data.size();++i){
118 template<
class MT,
unsigned int COLS,
unsigned int ROWS>
121 for(
unsigned int i=0;i<
m_data.size();++i){
122 *
m_data[i] = utils::clipped_cast<MT,T>(mat[i]);
128 inline std::vector<T>
asVec()
const{
129 std::vector<T> v(
m_data.size());
130 for(
unsigned int i=0;i<
m_data.size();++i){
143 inline void set(
const T &v0,
const T&v1,
const T&v2) {
set(v0,v1); *
m_data[2] = v2; }
146 inline void set(
const T &v0,
const T&v1,
const T&v2,
const T &v3) {
set(v0,v1,v2); *
m_data[3] = v3; }
150 template<
class ForwardIterator>
152 for(
unsigned int i=0;i<
m_data.size();++i,++begin){
172 return (
int)
m_data.size();
void set(const T &v0, const T &v1, const T &v2)
sets up the first three indices (unsafe)
Definition: PixelRef.h:143
Pixel-Type class for copying image pixles to image pixels.
Definition: PixelRef.h:60
Powerful and highly flexible matrix class implementation.
Definition: FixedMatrix.h:172
undocument this line if you encounter any issues!
Definition: Any.h:37
void setFromRange(ForwardIterator begin, ForwardIterator end)
assigns a ranges contents to the pixel data
Definition: PixelRef.h:151
std::vector< T * > m_data
Internal data.
Definition: PixelRef.h:63
bool isNull() const
returs whether this instance is null (created with the empty constructor)
Definition: PixelRef.h:71
const T & operator[](unsigned int channel) const
references a single element (const) (safe)
Definition: PixelRef.h:165
PixelRef & operator=(const PixelRef &other)
assignment operator which copies the values (most common)
Definition: PixelRef.h:92
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
PixelRef()
Empty constructor, create a null pixel ref with 0 length.
Definition: PixelRef.h:68
T & operator[](unsigned int channel)
references a single element (safe)
Definition: PixelRef.h:159
Specialization of the SmartPtrBase class for Arrays.
Definition: SmartArray.h:46
void set(const T &v0)
sets up the first index (unsafe)
Definition: PixelRef.h:137
void set(const T &v0, const T &v1)
sets up the first two indices (unsafe)
Definition: PixelRef.h:140
Base class for Exception handling in the ICL.
Definition: Exception.h:42
PixelRef & operator=(const std::vector< T > &vec)
assigns reference pixel values from vector data
Definition: PixelRef.h:101
PixelRef(int x, int y, int width, std::vector< utils::SmartArray< T > > &data)
single constructor to create a pixelref instance
Definition: PixelRef.h:75
ICLQt_API ImgQ channel(const ImgQ &image, int channel)
picks a specific image channel
int getChannels() const
returns the channel count
Definition: PixelRef.h:171
void set(const T &v0, const T &v1, const T &v2, const T &v3)
sets up the first four indices (unsafe)
Definition: PixelRef.h:146
PixelRef & operator=(const math::FixedMatrix< MT, COLS, ROWS > &mat)
assigns reference pixel values from FixedMatrix data
Definition: PixelRef.h:119
#define ICLASSERT_THROW(X, OBJ)
Definition: Macros.h:155
std::vector< T > asVec() const
copies image data into a std::vector
Definition: PixelRef.h:128
PixelRef(const PixelRef &other)
PixelRef copy constructor (copies the reference, not the values)
Definition: PixelRef.h:84