#include <qgarlib/LinDilatedImage.H>
Inheritance diagram for qgar::LinDilatedImage:

The length of the segment is 2 * aDilSize + 1. The algorithm is derived from [van Herk, 1992].
Definition at line 76 of file LinDilatedImage.H.
Public Types | |
Types | |
| typedef GreyLevelImage::value_type | value_type |
| Type of the elements stored in the pixel map. | |
| typedef value_type & | reference |
| Reference to qgar::LinDilatedImage::value_type. | |
| typedef const value_type & | const_reference |
| Constant reference to qgar::LinDilatedImage::value_type. | |
| typedef value_type * | pointer |
| Pointer to qgar::LinDilatedImage::value_type. | |
| typedef const value_type * | const_pointer |
| Constant pointer to qgar::LinDilatedImage::value_type. | |
Public Member Functions | |
| GenImage () | |
| Default constructor. | |
| GenImage (unsigned int aWidth, unsigned int aHeight) | |
| Initialize with given width and height. | |
| GenImage (unsigned int aWidth, unsigned int aHeight, pointer aPtPixMap) throw (QgarErrorInvalidArg) | |
| Initialize from a pixmap. | |
| GenImage (const GenImage &anImg) | |
| Copy constructor. | |
| GenImage (const GenImage< value_type, OtherCheckPolicy > &anImg) | |
| Conversion of an image of the same type, using policies. | |
| GenImage (const GenImage< U, UCheckPolicy > &anImg) | |
| Initialize from an image with pixels of a type different from T. | |
| GenImage (const GenImage< value_type, OtherCheckPolicy > &anImg, const BoundingBox &aBox, value_type aPixVal=static_cast< value_type >(0)) | |
| Initialize by copying a rectangular area, defined by a bounding box, of a given image. | |
| GenImage (const GenImage< value_type, OtherCheckPolicy > &anImg, unsigned int aXTopLeft, unsigned int aYTopLeft, unsigned int aXBottomRight, unsigned int aYBottomRight, value_type aPixVal=static_cast< value_type >(0)) | |
| Initialize by copying a rectangular area, defined by the coordinates of its top left and bottom right corners, of a given image. | |
| GenImage (AbstractPbmPlusFile &aPbmPlusFile) | |
| Initialize with an image in a PBM+ file. | |
| int | width () const |
| Get the image width. | |
| int | height () const |
| Get the image height. | |
| int | bytesPerPixel () const |
| Get the number of bytes per pixel. | |
| value_type | pixel (unsigned int aX, unsigned int aY) const |
| Get a pixel value. | |
| void | row (unsigned int aRowIdx, pointer aRow) const |
| Get a row of pixels. | |
| void | column (unsigned int aColIdx, pointer aCol) const |
| Get a column of pixels. | |
| pointer | pPixel (unsigned int aRowIdx, unsigned int aColIdx) const |
| Get a pointer on a given pixel of the image. | |
| pointer | pRow (unsigned int aRowIdx) const |
| Get a pointer on a row of pixels. | |
| pointer | pColumn (unsigned int aColIdx) const |
| Get a pointer on a column of pixels. | |
| pointer | pPixMap () const |
| Get the pointer to the pixel map. | |
| void | setPixel (unsigned int aX, unsigned int aY, value_type aPixVal) |
| Set a pixel value. | |
| void | setRow (unsigned int aRowIdx, const_pointer const aRow) |
| Set a given row of pixels. | |
| void | setColumn (unsigned int aColIdx, const_pointer const aCol) |
| Set a given column of pixels. | |
| void | draw (const Segment &aSeg, value_type aPixVal=(value_type) 1) |
| Draw a segment in the pixel map. | |
| GenImage | shallowCopy () |
| Shallow copy: The pixel map of the current image is not duplicated. | |
| GenImage< value_type, GenImage_NoCheck > | operator+ (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Same as function qgar::GenImage::plus. | |
| GenImage & | operator+= (const GenImage< value_type, OtherCheckPolicy > &anImg) |
| Same as function qgar::GenImage::plusEqual. | |
| GenImage< value_type, GenImage_NoCheck > | operator- (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Same as function qgar::GenImage::minus. | |
| GenImage & | operator-= (const GenImage< value_type, OtherCheckPolicy > &anImg) |
| Same as function qgar::GenImage::minusEqual. | |
| GenImage< value_type, GenImage_NoCheck > | operator * (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Same as function qgar::GenImage::times. | |
| GenImage & | operator *= (const GenImage< value_type, OtherCheckPolicy > &anImg) |
| Same as function qgar::GenImage::timesEqual. | |
| GenImage< value_type, GenImage_NoCheck > | plus (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Add each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map. | |
| GenImage & | plusEqual (const GenImage< value_type, OtherCheckPolicy > &anImg) throw (QgarErrorDomain) |
| Add a given image to the current image. | |
| GenImage< value_type, GenImage_NoCheck > | minus (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Subtract each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map. | |
| GenImage & | minusEqual (const GenImage< value_type, OtherCheckPolicy > &anImg) throw (QgarErrorDomain) |
| Subtract a given image to the current image. | |
| GenImage< value_type, GenImage_NoCheck > | times (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Multiply each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map. | |
| GenImage & | timesEqual (const GenImage< value_type, OtherCheckPolicy > &anImg) throw (QgarErrorDomain) |
| Multiply a given image by the current image. | |
| void | save (AbstractPbmPlusFile &aPbmPlusFile) const |
| Store current image into a PBM+ file. | |
| int | borderRows (int aRowIdx) const |
| Mirror border rows for convolutions. | |
| int | borderCols (int aColIdx) const |
| Mirror border columns for convolutions. | |
| void | checkRange (const unsigned char *const aPPixmap, int aWidth, const BoundingBox &aRange) const |
| Check a range. | |
Constructors | |
| LinDilatedImage (GreyLevelImage &anImg, QGEorientation anOrient=QGE_ORIENTATION_HOR, unsigned int aDilSize=1) throw (QgarErrorDomain) | |
| Construct from a binary image. | |
Static Public Member Functions | |
Linear dilation | |
| static void | perform (GreyLevelImage *anImg, QGEorientation anOrient, unsigned int aDilSize=1) |
| Perform a linear dilation on the given grey-level image. | |
Protected Member Functions | |
| GenImage (unsigned int aBytesCnt, int *aPtRefCnt, unsigned int aWidth, unsigned int aHeight, pointer aPtPixMap) | |
| Initialize from all data. | |
| void | copyBox (const GenImage< value_type, GenImage_NoCheck > &anImg, unsigned int aXTopLeft, unsigned int aYTopLeft, unsigned int aXBottomRight, unsigned int aYBottomRight, value_type aPixVal=static_cast< value_type >(0)) |
| Copy a rectangular area of the given image into the current image. | |
Protected Attributes | |
| unsigned int | _bytesPerPixel |
| Number of bytes per pixel. | |
| int * | _pRefCnt |
| Reference counter. | |
| int | _width |
| Image width. | |
| int | _height |
| Image height. | |
| pointer | _pPixMap |
| Pointer to the pixel map, organized as consecutive rows. | |
Static Private Member Functions | |
Oriented dilations | |
| static void | dilateHor (GreyLevelImage *anImg, unsigned int aDilSize) throw (QgarErrorDomain) |
| Horizontal dilation. | |
| static void | dilateVer (GreyLevelImage *anImg, unsigned int aDilSize) throw (QgarErrorDomain) |
| Vertical dilation. | |
| static void | dilatePdiag (GreyLevelImage *anImg, unsigned int aDilSize) throw (QgarErrorDomain) |
| NE-SW dilation. | |
| static void | dilateNdiag (GreyLevelImage *anImg, unsigned int aDilSize) throw (QgarErrorDomain) |
| NW-SE dilation. | |
| static void | dilateAll (GreyLevelImage *anImg, unsigned int aDilSize) throw (QgarErrorDomain) |
| Maximum of the 4 possible dilations. | |
|
|
Constant pointer to qgar::LinDilatedImage::value_type.
Reimplemented from qgar::GenImage< unsigned char >. Definition at line 113 of file LinDilatedImage.H. |
|
|
Constant reference to qgar::LinDilatedImage::value_type.
Reimplemented from qgar::GenImage< unsigned char >. Definition at line 103 of file LinDilatedImage.H. |
|
|
Pointer to qgar::LinDilatedImage::value_type.
Reimplemented from qgar::GenImage< unsigned char >. Definition at line 108 of file LinDilatedImage.H. |
|
|
Reference to qgar::LinDilatedImage::value_type.
Reimplemented from qgar::GenImage< unsigned char >. Definition at line 98 of file LinDilatedImage.H. |
|
|
Type of the elements stored in the pixel map.
Reimplemented from qgar::GenImage< unsigned char >. Definition at line 93 of file LinDilatedImage.H. |
|
||||||||||||||||
|
Construct from a binary image. Orientation qgar::QGE_ORIENTATION_ALL corresponds to the maximum of the 4 possible dilations.
Definition at line 58 of file LinDilatedImage.C. |
|
|
Mirror border columns for convolutions.
|
|
|
Mirror border rows for convolutions.
|
|
|
Get the number of bytes per pixel.
|
|
||||||||||||||||
|
Check a range.
Definition at line 110 of file GenImage.H. |
|
||||||||||||
|
Get a column of pixels.
|
|
||||||||||||||||||||||||||||
|
Copy a rectangular area of the given image into the current image. The sides of the rectangle are parallel to the coordinate axis.
|
|
||||||||||||
|
Maximum of the 4 possible dilations.
Definition at line 813 of file LinDilatedImage.C. References qgar::GenImage< T, CheckPolicy >::row(), and qgar::GenImage< T, CheckPolicy >::setRow(). Referenced by perform(). |
|
||||||||||||
|
Horizontal dilation.
Definition at line 100 of file LinDilatedImage.C. Referenced by perform(). |
|
||||||||||||
|
NW-SE dilation.
Definition at line 613 of file LinDilatedImage.C. Referenced by perform(). |
|
||||||||||||
|
NE-SW dilation.
Definition at line 413 of file LinDilatedImage.C. Referenced by perform(). |
|
||||||||||||
|
Vertical dilation.
Definition at line 256 of file LinDilatedImage.C. Referenced by perform(). |
|
||||||||||||
|
Draw a segment in the pixel map. The segment pixels are set using Bresenham's algorithm. See W.M. Newman and R.F. Sproull, Principles of Interactive Computer Graphics, pp. 25-26.
|
|
||||||||||||||||||||||||
|
Initialize from all data.
|
|
|
Initialize with an image in a PBM+ file. The given PBM+ file is opened (in READ ONLY mode) at the call, and closed before returning.
|
|
||||||||||||||||||||||||||||
|
Initialize by copying a rectangular area, defined by the coordinates of its top left and bottom right corners, of a given image. The rectangle sides are parallel to the coordinate axis.
|
|
||||||||||||||||
|
Initialize by copying a rectangular area, defined by a bounding box, of a given image. The rectangle sides are parallel to the coordinate axis.
|
|
|
Initialize from an image with pixels of a type different from T.
|
|
|
Conversion of an image of the same type, using policies.
|
|
|
Copy constructor. Perform a deep copy: The pixel map of the source image is duplicated.
|
|
||||||||||||||||
|
Initialize from a pixmap.
|
|
||||||||||||
|
Initialize with given width and height.
|
|
|
Default constructor. Set 0 to width, to height, to pointer to pixel map, and to reference counter. |
|
|
Get the image height.
Referenced by qgar::GeodesicRecEroBinaryImage::perform(). |
|
|
Subtract each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.
|
|
|
Subtract a given image to the current image.
|
|
|
Same as function qgar::GenImage::times.
|
|
|
Same as function qgar::GenImage::timesEqual.
|
|
|
Same as function qgar::GenImage::plus.
|
|
|
Same as function qgar::GenImage::plusEqual.
|
|
|
Same as function qgar::GenImage::minus.
|
|
|
Same as function qgar::GenImage::minusEqual.
|
|
|
Get a pointer on a column of pixels.
|
|
||||||||||||||||
|
Perform a linear dilation on the given grey-level image. To be used to perform a linear dilation without preserving the initial image. Orientation qgar::QGE_ORIENTATION_ALL corresponds to the maximum of the 4 possible dilations.
Definition at line 74 of file LinDilatedImage.C. References dilateAll(), dilateHor(), dilateNdiag(), dilatePdiag(), dilateVer(), qgar::QGE_ORIENTATION_ALL, qgar::QGE_ORIENTATION_DIAG_NEG, qgar::QGE_ORIENTATION_DIAG_POS, qgar::QGE_ORIENTATION_HOR, and qgar::QGE_ORIENTATION_VER. Referenced by qgar::DilatedImage::perform(). |
|
||||||||||||
|
Get a pixel value.
|
|
|
Add each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.
|
|
|
Add a given image to the current image. Add each pixel of the given image to the corresponding pixel of the current image and store each result in the pixel map of the current image.
|
|
||||||||||||
|
Get a pointer on a given pixel of the image.
|
|
|
Get the pointer to the pixel map.
Referenced by qgar::ThresBinaryImage::ThresBinaryImage(), and qgar::TTBinaryImage::TTBinaryImage(). |
|
|
Get a pointer on a row of pixels.
|