Public Member Functions | |
QVImage () | |
Default constructor. | |
QVImage (uInt cols, uInt rows, uInt step=0, const Type *buffer=NULL) | |
Dimensions and buffer constructor. | |
QVImage (QVImage< uChar, 1 > const &img) | |
Copy constructor. | |
QVImage (QVImage< uChar, 3 > const &img) | |
QVImage (QVImage< sShort, 1 > const &img) | |
QVImage (QVImage< sShort, 3 > const &img) | |
QVImage (QVImage< sFloat, 1 > const &img) | |
QVImage (QVImage< sFloat, 3 > const &img) | |
const char * | getTypeQString () const |
uInt | getRows () const |
uInt | getCols () const |
uInt | getStep () const |
uInt | getPlanes () const |
uInt | getDataSize () const |
uInt | getTypeSize () const |
const Type * | getReadData () const |
Method to obtain image data buffer, in read mode. | |
Type * | getWriteData () |
Method to obtain image data buffer, in read/write mode. | |
void | set (Type c1=0, Type c2=0, Type c3=0) |
Sets pixel values for an image, to a given value. | |
Type & | operator() (const uInt col, const uInt row, const uInt channel=0) |
Operator to access pixel values for a pixel channel, given it's coordinates. | |
Type | operator() (const uInt col, const uInt row, const uInt channel=0) const |
Type & | operator() (const QPoint point, const uInt channel=0) |
Overload of operator (), to access pixel values for a pixel channel, given a QVPoint and a channel number. | |
Type | operator() (const QPoint point, const uInt channel=0) const |
QVImage< Type, Planes > & | operator= (const QVImage< uChar, 1 > &sourceImage) |
Copy operator. | |
QVImage< Type, Planes > & | operator= (const QVImage< uChar, 3 > &sourceImage) |
QVImage< Type, Planes > & | operator= (const QVImage< sShort, 1 > &sourceImage) |
QVImage< Type, Planes > & | operator= (const QVImage< sShort, 3 > &sourceImage) |
QVImage< Type, Planes > & | operator= (const QVImage< sFloat, 1 > &sourceImage) |
QVImage< Type, Planes > & | operator= (const QVImage< sFloat, 3 > &sourceImage) |
bool | operator== (const QVImage< Type, Planes > &img) const |
Equality compare operator. | |
bool | operator!= (const QVImage< Type, Planes > &img) const |
Inequality compare operator. | |
QVImage< uChar > | operator< (const QVImage< Type, Planes > &img) const |
Pixel wise 'less than' compare operator. | |
QVImage< uChar > | operator> (const QVImage< Type, Planes > &img) const |
Pixel wise 'greater than' compare operator. | |
QVImage< uChar > | operator<= (const QVImage< Type, Planes > &img) const |
Pixel wise 'less or equal than' compare operator. | |
QVImage< uChar > | operator>= (const QVImage< Type, Planes > &img) const |
Pixel wise 'greater or equal than' compare operator. | |
QVImage< Type, Planes > | operator+ (const Type constant) const |
Pixel wise constant add operator. | |
QVImage< Type, Planes > | operator * (const Type constant) const |
Pixel wise constant product operator. | |
QVImage< Type, Planes > | operator- (const Type constant) const |
Pixel wise constant subtraction operator. | |
QVImage< Type, Planes > | operator/ (const Type constant) const |
Pixel wise constant division operator. | |
QVImage< Type, Planes > | operator<< (const Type constant) const |
Pixel wise bit-wise left shift operator. | |
QVImage< Type, Planes > | operator>> (const Type constant) const |
Pixel wise bit-wise right shift operator. | |
QVImage< Type, Planes > | operator! () const |
Pixel wise bit-wise NOT operation. | |
QVImage< Type, Planes > | operator & (const Type constant) const |
Pixel wise bit-wise boolean and operator. | |
QVImage< Type, Planes > | operator| (const Type constant) const |
Pixel wise bit-wise boolean or operator. | |
QVImage< Type, Planes > | operator^ (const Type constant) const |
Pixel wise bit-wise boolean xor operator. | |
QVImage< Type, Planes > | operator+ (const QVImage< Type, Planes > &img) const |
Pixel wise add operator. | |
QVImage< Type, Planes > | operator * (const QVImage< Type, Planes > &img) const |
Pixel wise mult operator. | |
QVImage< Type, Planes > | operator- (const QVImage< Type, Planes > &img) const |
Pixel wise subtraction operator. | |
QVImage< Type, Planes > | operator/ (const QVImage< Type, Planes > &img) const |
Pixel wise division operator. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
Protected Attributes | |
QSharedDataPointer < QVImageBuffer < Type, Planes > > | imageBuffer |
Definition at line 302 of file qvimage.h.
Default constructor.
Initializes image with a data buffer of size 1x1. Sets anchor to pixel (0,0), and region of interest to a rectangle containing the only pixel of the image.
Definition at line 310 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer, QVGenericImage::setAnchor(), and QVGenericImage::setROI().
QVImage< Type, Planes >::QVImage | ( | uInt | cols, | |
uInt | rows, | |||
uInt | step = 0 , |
|||
const Type * | buffer = NULL | |||
) | [inline] |
Dimensions and buffer constructor.
Creates an image of dimension cols x rows, and optionally you can define a given step for the image.
If buffer points to a region of memory, it will use that region as image data.
DEPRECATED: you shouldn't be able to specify a pointer to a buffer. If you need a image data buffer, create an image, and use it's.
cols | number of columns for the image. | |
rows | number of rows for the image. | |
step | defined step for the image. | |
buffer | pointer to a memory zone where image is and will be stored. |
Definition at line 330 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer, QVGenericImage::setAnchor(), and QVGenericImage::setROI().
QVImage< Type, Planes >::QVImage | ( | QVImage< uChar, 1 > const & | img | ) |
Copy constructor.
This constructor can be used with images of same bit depth, or which have same channel number, than those given by parameter.
In this case, this constructor will be defined for images of uChar bit depth, or that have just one channel number.
If given QVImage has same bit depth and plane numbers, this constructor will copy the reference to that image data buffer, and will use copy on write technique if needed. Otherwise, it will allocate a new data buffer for the image, and make a conversion from different bit depth or channel number.
The region of interest, and the anchor of this image will be set to those from the image given by parameter.
img | image to be copied. |
QVImage< Type, Planes >::QVImage | ( | QVImage< uChar, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Planes >::QVImage | ( | QVImage< sShort, 1 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Planes >::QVImage | ( | QVImage< sShort, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Planes >::QVImage | ( | QVImage< sFloat, 1 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Planes >::QVImage | ( | QVImage< sFloat, 3 > const & | img | ) |
Overloaded copy constructor.
const char* QVImage< Type, Planes >::getTypeQString | ( | ) | const [virtual] |
Overloaded function from QVGenericImage::getTypeQString()
Implements QVGenericImage.
uInt QVImage< Type, Planes >::getRows | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getRows()
Implements QVGenericImage.
Definition at line 374 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by qvdta::CountingSort(), qvdta::FilterLocalMax(), qvdta::getContoursThreshold(), qvdta::HarrisCornerResponseImage(), qvdta::myFloodFill(), QVImage< Type, Planes >::operator()(), QVImage< Type, Planes >::operator==(), and qvdta::SobelCornerResponseImage().
uInt QVImage< Type, Planes >::getCols | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getCols()
Implements QVGenericImage.
Definition at line 377 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by qvdta::CountingSort(), qvdta::FilterLocalMax(), qvdta::getContoursThreshold(), qvdta::HarrisCornerResponseImage(), qvdta::myFloodFill(), QVImage< Type, Planes >::operator()(), QVImage< Type, Planes >::operator==(), and qvdta::SobelCornerResponseImage().
uInt QVImage< Type, Planes >::getStep | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getStep()
Implements QVGenericImage.
Definition at line 380 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by qvipp::Canny(), qvipp::FastMarching(), qvipp::HistogramRange(), qvipp::Inpaint(), qvipp::MinEigenVal(), and QVImage< Type, Planes >::operator()().
uInt QVImage< Type, Planes >::getPlanes | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getPlanes()
Implements QVGenericImage.
Definition at line 383 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by QVImage< Type, Planes >::operator==().
uInt QVImage< Type, Planes >::getDataSize | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getDataSize()
Implements QVGenericImage.
Definition at line 386 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by QVImage< Type, Planes >::operator()().
uInt QVImage< Type, Planes >::getTypeSize | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getTypeSize()
Implements QVGenericImage.
Definition at line 389 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
const Type* QVImage< Type, Planes >::getReadData | ( | ) | const [inline] |
Method to obtain image data buffer, in read mode.
This method can be used to program fast access algorithms to pixel values in an image.
It is intended to be used only to read pixels in an image, thus getWriteData() method should be used when access to write or read/write is intended to be done.
This function will generally be faster than getWriteData(), because it will not need to realize copy on write, in the case that the image data buffer where shared with other QVImage.
Definition at line 401 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by qvipp::Inpaint().
Type* QVImage< Type, Planes >::getWriteData | ( | ) | [inline] |
Method to obtain image data buffer, in read/write mode.
This method can be used to program fast access algorithms to pixel values in an image.
This function will perform copy on write in the case that the data buffer for this image where shared with other QVImage's.
Thus can be slower than getReadData() method to access image pixels, but will ensure avoiding side effects on modifying shared buffers with other images.
Definition at line 413 of file qvimage.h.
References QVImage< Type, Planes >::imageBuffer.
Referenced by qvipp::Canny(), qvipp::FastMarching(), and qvipp::MinEigenVal().
void QVImage< Type, Planes >::set | ( | Type | c1 = 0 , |
|
Type | c2 = 0 , |
|||
Type | c3 = 0 | |||
) |
Sets pixel values for an image, to a given value.
This method uses the region of interest of the image, to set pixels inside it to a given value. It can be used either for one channel, or several channel images.
In the former case, it should be used with one parameter, only specifying value for the first channel, otherwise, values for other channels will be ignored. If no parameters are given, the image region of interest will be set to zero value pixels.
In the latter case, default values of 0 will be used if there are unspecified channel values.
c1 | value to set pixel's first channel in the region of interest of the image. | |
c2 | value to set pixel's second channel in the region of interest of the image. | |
c3 | value to set pixel's third channel in the region of interest of the image. |
Type& QVImage< Type, Planes >::operator() | ( | const uInt | col, | |
const uInt | row, | |||
const uInt | channel = 0 | |||
) | [inline] |
Operator to access pixel values for a pixel channel, given it's coordinates.
This operator can be used either with one channel or multichannel images. In the first case, it shouldn't be given a channel number, to use the default zero value.
col | column number of pixel to be accessed. | |
row | row number of pixel to be accessed. | |
channel | channel number of pixel to be accessed. |
Definition at line 439 of file qvimage.h.
References QVImage< Type, Planes >::getCols(), QVImage< Type, Planes >::getDataSize(), QVImage< Type, Planes >::getRows(), QVImage< Type, Planes >::getStep(), and QVImage< Type, Planes >::imageBuffer.
Type& QVImage< Type, Planes >::operator() | ( | const QPoint | point, | |
const uInt | channel = 0 | |||
) | [inline] |
Overload of operator (), to access pixel values for a pixel channel, given a QVPoint and a channel number.
This overload is like the previous, but can be used with a QPoint, to access a concrete pixel in the image.
point | QPoint indicating location of the pixel to be accessed. | |
channel | channel number of pixel to be accessed. |
Definition at line 474 of file qvimage.h.
References QVImage< Type, Planes >::getCols(), QVImage< Type, Planes >::getDataSize(), QVImage< Type, Planes >::getRows(), QVImage< Type, Planes >::getStep(), and QVImage< Type, Planes >::imageBuffer.
QVImage<Type, Planes>& QVImage< Type, Planes >::operator= | ( | const QVImage< uChar, 1 > & | sourceImage | ) |
Copy operator.
This operator can be used with images of same bit depth, or which have same channel number, than those given by parameter.
In this case, this operator will be defined for images of uChar bit depth, or that have just one channel number.
If given QVImage has same bit depth and plane numbers, this operator will copy the reference to that image data buffer, and will use copy on write technique if needed. Otherwise, it will allocate a new data buffer for the image, and make a conversion from different bit depth or channel number.
The region of interest, and the anchor of this image will be set to those from the image given by parameter.
img | image to be copied. |
QVImage<Type, Planes>& QVImage< Type, Planes >::operator= | ( | const QVImage< uChar, 3 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Planes>& QVImage< Type, Planes >::operator= | ( | const QVImage< sShort, 1 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Planes>& QVImage< Type, Planes >::operator= | ( | const QVImage< sShort, 3 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Planes>& QVImage< Type, Planes >::operator= | ( | const QVImage< sFloat, 1 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Planes>& QVImage< Type, Planes >::operator= | ( | const QVImage< sFloat, 3 > & | sourceImage | ) |
Overloaded copy operator.
bool QVImage< Type, C >::operator== | ( | const QVImage< Type, C > & | img | ) | const [inline] |
Equality compare operator.
This operator will compare two images of same bit depth and channel number, and will return true if images are equal in all of these:
img | image to compare with this image. |
Definition at line 728 of file qvimage.h.
References QVImage< Type, Planes >::getCols(), QVImage< Type, Planes >::getPlanes(), QVGenericImage::getROI(), QVImage< Type, Planes >::getRows(), QVIMAGE_INIT_READ, QVIMAGE_PIXEL, and QVIMAGE_PTR_INIT_READ.
bool QVImage< Type, Planes >::operator!= | ( | const QVImage< Type, Planes > & | img | ) | const [inline] |
Inequality compare operator.
This operator will compare two images of same bit depth and channel number, and will return true if images differ in any of:
DEPRECATED: Shouldn't ignore dimensions in caparisons, and only check if region of interest content are the same?
img | image to compare with this image. |
QVImage<uChar> QVImage< Type, Planes >::operator< | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise 'less than' compare operator.
img | image to compare with this image. |
QVImage<uChar> QVImage< Type, Planes >::operator> | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise 'greater than' compare operator.
img | image to compare with this image. |
QVImage<uChar> QVImage< Type, Planes >::operator<= | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise 'less or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar> QVImage< Type, Planes >::operator>= | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise 'greater or equal than' compare operator.
img | image to compare with this image. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator+ | ( | const Type | constant | ) | const |
Pixel wise constant add operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator * | ( | const Type | constant | ) | const |
Pixel wise constant product operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator- | ( | const Type | constant | ) | const |
Pixel wise constant subtraction operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator/ | ( | const Type | constant | ) | const |
Pixel wise constant division operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator<< | ( | const Type | constant | ) | const |
Pixel wise bit-wise left shift operator.
Uses as the value to shift a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator>> | ( | const Type | constant | ) | const |
Pixel wise bit-wise right shift operator.
Uses as the value to shift a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator! | ( | ) | const |
Pixel wise bit-wise NOT operation.
Regions of interests, and anchors are applied in this operator.
QVImage<Type, Planes> QVImage< Type, Planes >::operator & | ( | const Type | constant | ) | const |
Pixel wise bit-wise boolean and operator.
Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator| | ( | const Type | constant | ) | const |
Pixel wise bit-wise boolean or operator.
Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator^ | ( | const Type | constant | ) | const |
Pixel wise bit-wise boolean xor operator.
Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator+ | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise add operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator * | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise mult operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator- | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise subtraction operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
QVImage<Type, Planes> QVImage< Type, Planes >::operator/ | ( | const QVImage< Type, Planes > & | img | ) | const |
Pixel wise division operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
const char * QVImage< uChar, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 28 of file qvimage.cpp.
const char * QVImage< uChar, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 29 of file qvimage.cpp.
const char * QVImage< sShort, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 30 of file qvimage.cpp.
const char * QVImage< sShort, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 31 of file qvimage.cpp.
const char * QVImage< sFloat, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 32 of file qvimage.cpp.
const char * QVImage< sFloat, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 33 of file qvimage.cpp.