MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class template representing a rectangle within an existing image. More...
#include <mdsImageView.h>
Public Types | |
enum | { CLASS_IMAGE_VIEW } |
Simple tag of "image view" classes. More... | |
enum | { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE } |
Check that I is a image. More... | |
typedef CImageBase< CRect< I > > | tBase |
Base class. | |
typedef I | tImage |
Image type. | |
typedef I::tPixel | tPixel |
Pixel type. | |
Public Member Functions | |
tPixel & | at (tSize x, tSize y) |
Returns the pixel [x][y]. | |
const tPixel & | at (tSize x, tSize y) const |
tPixel & | at (tSize i) |
Returns the subscripted pixel. | |
const tPixel & | at (tSize i) const |
void | copyFrom (const tPixel *pSrc) |
Fills the rectangle using a given input buffer. | |
void | copyTo (tPixel *pDst) const |
Copies the data to the output buffer. | |
CRect (const tImage &Image, tSize x, tSize y, tSize XSize, tSize YSize) | |
Constructor... | |
CRect (const tImage &Image, const CPoint2i &Pos, const CSize2i &Size) | |
Yet another constructor... | |
CRect (const tImage &Image, const CRange &XRange, const CRange &YRange) | |
Yet another constructor... | |
CRect (const CRect &) | |
Copy constructor. | |
CRect & | fill (const tPixel &c) |
Fills the rectangle using a given pixel value. | |
template<class Function > | |
Function | forEach (Function Func) |
Calls a function object for every image pixel. | |
template<class Function > | |
Function | forEach (Function Func) |
Calls a function object for every pixel in the rectangle. | |
template<class Function > | |
Function | forEach (Function Func) const |
Calls a function object for every image pixel. | |
template<class Function > | |
Function | forEach (Function Func) const |
Calls a function object for every pixel in the rectangle. | |
tSize | getIdx (tSize x, tSize y) const |
Calculates index of the pixel [x][y]. | |
tImage & | getImageRef () const |
Returns reference to the original image. | |
tImage & | getImpl () |
Returns reference to the image implementation. | |
const tImage & | getImpl () const |
tSize | getMargin () const |
Returns the image margin size in pixels. | |
CPoint2i & | getPos () |
Returns position of the left upper corner. | |
const CPoint2i & | getPos () const |
CSize2i & | getSize () |
Returns size of the rectangle. | |
const CSize2i & | getSize () const |
tSize | getXOffset () const |
Returns offset between two neigbouring pixels in x-axis. | |
tSize | getXSize () const |
Returns the image size (dimensions). | |
tSize | getYOffset () const |
Returns offset between two neigbouring pixels in y-axis. | |
tSize | getYSize () const |
tSize | height () const |
tPixel & | operator() (tSize x, tSize y) |
Returns the subscripted pixel [x][y]. | |
const tPixel & | operator() (tSize x, tSize y) const |
tPixel & | operator() (tSize i) |
Returns the subscripted pixel. | |
const tPixel & | operator() (tSize i) const |
template<class Derived > | |
CRect< I > & | operator*= (const CImageBase< Derived > &Image) |
template<typename U > | |
CRect< I > & | operator*= (const U &c) |
template<class Derived > | |
CRect & | operator*= (const CImageBase< Derived > &Image) |
Pixel wise product. | |
template<typename U > | |
CRect & | operator*= (const U &c) |
Multiplies all pixels by scalar. | |
template<class Derived > | |
CRect< I > & | operator+= (const CImageBase< Derived > &Image) |
template<typename U > | |
CRect< I > & | operator+= (const U &c) |
template<class Derived > | |
CRect & | operator+= (const CImageBase< Derived > &Image) |
Pixel wise addition. | |
template<typename U > | |
CRect & | operator+= (const U &c) |
Adds scalar to all pixels. | |
template<class Derived > | |
CRect< I > & | operator-= (const CImageBase< Derived > &Image) |
template<typename U > | |
CRect< I > & | operator-= (const U &c) |
template<class Derived > | |
CRect & | operator-= (const CImageBase< Derived > &Image) |
Pixel wise subtraction. | |
template<typename U > | |
CRect & | operator-= (const U &c) |
Subtracts scalar from all pixels. | |
template<class Derived > | |
CRect< I > & | operator/= (const CImageBase< Derived > &Image) |
template<typename U > | |
CRect< I > & | operator/= (const U &c) |
template<class Derived > | |
CRect & | operator/= (const CImageBase< Derived > &Image) |
Pixel wise division. | |
template<typename U > | |
CRect & | operator/= (const U &c) |
Divides all pixels by scalar. | |
template<class Function > | |
Function | pforEach (Function Func) |
Calls a function object for every pixel in the rectangle. | |
template<class Function > | |
Function | pforEach (Function Func) const |
Calls a function object for every pixel in the rectangle. | |
template<class Function > | |
Function | pforEach (Function Func) |
Calls a function object for every image pixel. | |
template<class Function > | |
Function | pforEach (Function Func) const |
Calls a function object for every image pixel. | |
tImage & | set (tSize x, tSize y, const tPixel &Value) |
Sets the pixel at the position [x][y][z]. | |
CRect & | set (tSize x, tSize y, const tPixel &Value) |
Sets the pixel at the position [x][y]. | |
tImage & | set (tSize i, const tPixel &Value) |
Sets the subscripted pixel. | |
CRect & | set (tSize i, const tPixel &Value) |
Sets the subsripted pixel. | |
tSize | width () const |
Returns the image size (dimensions). | |
Protected Member Functions | |
CRect & | operator= (const CRect &) |
Proctected assignment operator. | |
Protected Attributes | |
tImage & | m_Image |
Reference to the original image. | |
CPoint2i | m_Pos |
Coordinates of the origin. | |
CSize2i | m_Size |
Size of the rectangle. |
Class template representing a rectangle within an existing image.
typedef CImageBase<CRect<I> > mds::img::CRect< I >::tBase |
Base class.
typedef I mds::img::CRect< I >::tImage |
Image type.
Reimplemented from mds::img::CImageBase< CRect< I > >.
typedef I::tPixel mds::img::CRect< I >::tPixel |
Pixel type.
Reimplemented from mds::img::CImageBase< CRect< I > >.
anonymous enum |
CRect::CRect | ( | const tImage & | Image, |
tSize | x, | ||
tSize | y, | ||
tSize | XSize, | ||
tSize | YSize | ||
) |
Constructor...
CRect::CRect | ( | const tImage & | Image, |
const CPoint2i & | Pos, | ||
const CSize2i & | Size | ||
) |
Yet another constructor...
CRect::CRect | ( | const tImage & | Image, |
const CRange & | XRange, | ||
const CRange & | YRange | ||
) |
Yet another constructor...
mds::img::CRect< I >::CRect | ( | const CRect< I > & | Rect | ) |
Copy constructor.
tPixel& mds::img::CRect< I >::at | ( | tSize | x, |
tSize | y | ||
) |
Returns the pixel [x][y].
Reimplemented from mds::img::CImageBase< CRect< I > >.
const tPixel& mds::img::CRect< I >::at | ( | tSize | x, |
tSize | y | ||
) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
tPixel& mds::img::CRect< I >::at | ( | tSize | i | ) |
Returns the subscripted pixel.
Reimplemented from mds::img::CImageBase< CRect< I > >.
const tPixel& mds::img::CRect< I >::at | ( | tSize | i | ) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
void CRect::copyFrom | ( | const tPixel * | pSrc | ) |
Fills the rectangle using a given input buffer.
void CRect::copyTo | ( | tPixel * | pDst | ) | const |
Copies the data to the output buffer.
CRect< I > & CRect::fill | ( | const tPixel & | c | ) |
Fills the rectangle using a given pixel value.
Function mds::img::CRect< I >::forEach | ( | Function | Func | ) |
Calls a function object for every image pixel.
Reimplemented from mds::img::CImageBase< CRect< I > >.
Function mds::img::CRect< I >::forEach | ( | Function | Func | ) |
Calls a function object for every pixel in the rectangle.
Reimplemented from mds::img::CImageBase< CRect< I > >.
Function mds::img::CRect< I >::forEach | ( | Function | Func | ) | const |
Calls a function object for every image pixel.
Reimplemented from mds::img::CImageBase< CRect< I > >.
Function mds::img::CRect< I >::forEach | ( | Function | Func | ) | const |
Calls a function object for every pixel in the rectangle.
Reimplemented from mds::img::CImageBase< CRect< I > >.
tSize mds::img::CRect< I >::getIdx | ( | tSize | x, |
tSize | y | ||
) | const |
Calculates index of the pixel [x][y].
Reimplemented from mds::img::CImageBase< CRect< I > >.
tImage& mds::img::CRect< I >::getImageRef | ( | ) | const |
Returns reference to the original image.
tImage& mds::img::CImageBase< CRect< I > >::getImpl | ( | ) | [inherited] |
Returns reference to the image implementation.
const tImage& mds::img::CImageBase< CRect< I > >::getImpl | ( | ) | const [inherited] |
tSize mds::img::CRect< I >::getMargin | ( | ) | const |
Returns the image margin size in pixels.
Reimplemented from mds::img::CImageBase< CRect< I > >.
CPoint2i& mds::img::CRect< I >::getPos | ( | ) |
Returns position of the left upper corner.
const CPoint2i& mds::img::CRect< I >::getPos | ( | ) | const |
CSize2i& mds::img::CRect< I >::getSize | ( | ) |
Returns size of the rectangle.
Reimplemented from mds::img::CImageBase< CRect< I > >.
const CSize2i& mds::img::CRect< I >::getSize | ( | ) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
tSize mds::img::CRect< I >::getXOffset | ( | ) | const |
Returns offset between two neigbouring pixels in x-axis.
Reimplemented from mds::img::CImageBase< CRect< I > >.
tSize mds::img::CRect< I >::getXSize | ( | ) | const |
Returns the image size (dimensions).
Reimplemented from mds::img::CImageBase< CRect< I > >.
tSize mds::img::CRect< I >::getYOffset | ( | ) | const |
Returns offset between two neigbouring pixels in y-axis.
Reimplemented from mds::img::CImageBase< CRect< I > >.
tSize mds::img::CRect< I >::getYSize | ( | ) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
tSize mds::img::CRect< I >::height | ( | ) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
tPixel& mds::img::CRect< I >::operator() | ( | tSize | x, |
tSize | y | ||
) |
Returns the subscripted pixel [x][y].
Reimplemented from mds::img::CImageBase< CRect< I > >.
const tPixel& mds::img::CRect< I >::operator() | ( | tSize | x, |
tSize | y | ||
) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
tPixel& mds::img::CRect< I >::operator() | ( | tSize | i | ) |
Returns the subscripted pixel.
Reimplemented from mds::img::CImageBase< CRect< I > >.
const tPixel& mds::img::CRect< I >::operator() | ( | tSize | i | ) | const |
Reimplemented from mds::img::CImageBase< CRect< I > >.
CRect<I>& mds::img::CRect< I >::operator*= | ( | const CImageBase< Derived > & | Image | ) |
CRect< I > & mds::img::CRect< I >::operator*= | ( | const CImageBase< Derived > & | Image | ) |
Pixel wise product.
CRect< I > & mds::img::CRect< I >::operator*= | ( | const U & | c | ) |
Multiplies all pixels by scalar.
CRect<I>& mds::img::CRect< I >::operator+= | ( | const CImageBase< Derived > & | Image | ) |
CRect< I > & mds::img::CRect< I >::operator+= | ( | const CImageBase< Derived > & | Image | ) |
Pixel wise addition.
CRect< I > & mds::img::CRect< I >::operator+= | ( | const U & | c | ) |
Adds scalar to all pixels.
CRect<I>& mds::img::CRect< I >::operator-= | ( | const CImageBase< Derived > & | Image | ) |
CRect< I > & mds::img::CRect< I >::operator-= | ( | const CImageBase< Derived > & | Image | ) |
Pixel wise subtraction.
CRect< I > & mds::img::CRect< I >::operator-= | ( | const U & | c | ) |
Subtracts scalar from all pixels.
CRect<I>& mds::img::CRect< I >::operator/= | ( | const CImageBase< Derived > & | Image | ) |
CRect< I > & mds::img::CRect< I >::operator/= | ( | const CImageBase< Derived > & | Image | ) |
Pixel wise division.
CRect< I > & mds::img::CRect< I >::operator/= | ( | const U & | c | ) |
Divides all pixels by scalar.
CRect& mds::img::CRect< I >::operator= | ( | const CRect< I > & | ) | [protected] |
Proctected assignment operator.
Function mds::img::CRect< I >::pforEach | ( | Function | Func | ) |
Calls a function object for every pixel in the rectangle.
Reimplemented from mds::img::CImageBase< CRect< I > >.
Function mds::img::CRect< I >::pforEach | ( | Function | Func | ) | const |
Calls a function object for every pixel in the rectangle.
Reimplemented from mds::img::CImageBase< CRect< I > >.
Function mds::img::CRect< I >::pforEach | ( | Function | Func | ) |
Calls a function object for every image pixel.
Reimplemented from mds::img::CImageBase< CRect< I > >.
Function mds::img::CRect< I >::pforEach | ( | Function | Func | ) | const |
Calls a function object for every image pixel.
Reimplemented from mds::img::CImageBase< CRect< I > >.
tImage& mds::img::CImageBase< CRect< I > >::set | ( | tSize | x, |
tSize | y, | ||
const tPixel & | Value | ||
) | [inherited] |
Sets the pixel at the position [x][y][z].
Sets the pixel at the position [x][y].
Sets the subscripted pixel.
CRect& mds::img::CRect< I >::set | ( | tSize | i, |
const tPixel & | Value | ||
) |
Sets the subsripted pixel.
tSize mds::img::CRect< I >::width | ( | ) | const |
Returns the image size (dimensions).
Reimplemented from mds::img::CImageBase< CRect< I > >.
tImage& mds::img::CRect< I >::m_Image [protected] |
Reference to the original image.
CPoint2i mds::img::CRect< I >::m_Pos [protected] |
Coordinates of the origin.
CSize2i mds::img::CRect< I >::m_Size [protected] |
Size of the rectangle.