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

The structural element is a square of size (2 * anOpenSize) + 1.
Definition at line 75 of file OpenImage.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::OpenImage::value_type. | |
| typedef const value_type & | const_reference |
| Constant reference to qgar::OpenImage::value_type. | |
| typedef value_type * | pointer |
| Pointer to qgar::OpenImage::value_type. | |
| typedef const value_type * | const_pointer |
| Constant pointer to qgar::OpenImage::value_type. | |
Public Member Functions | |
Constructors | |
| OpenImage (const GreyLevelImage &anImg, unsigned int anOpenSize=1) throw (QgarErrorDomain) | |
| Construct from given grey-level image. | |
Access to image characteristics | |
| int | width () const |
| Get the image width. | |
| int | height () const |
| Get the image height. | |
| int | bytesPerPixel () const |
| Get the number of bytes per pixel. | |
Access to pixel values | |
| 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. | |
Access to direct transformations of the pixel map | |
| 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. | |
Set pixel values | |
| 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. | |
Draw in the pixel map | |
| void | draw (const Segment &aSeg, value_type aPixVal=(value_type) 1) |
| Draw a segment in the pixel map. | |
Copy | |
| GenImage | shallowCopy () |
| Shallow copy: The pixel map of the current image is not duplicated. | |
Operators | |
| |
| template<template< class > class OtherCheckPolicy> | |
| GenImage< value_type, GenImage_NoCheck > | operator+ (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Same as function qgar::GenImage::plus. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage & | operator+= (const GenImage< value_type, OtherCheckPolicy > &anImg) |
| Same as function qgar::GenImage::plusEqual. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage< value_type, GenImage_NoCheck > | operator- (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Same as function qgar::GenImage::minus. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage & | operator-= (const GenImage< value_type, OtherCheckPolicy > &anImg) |
| Same as function qgar::GenImage::minusEqual. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage< value_type, GenImage_NoCheck > | operator * (const GenImage< value_type, OtherCheckPolicy > &anImg) const |
| Same as function qgar::GenImage::times. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage & | operator *= (const GenImage< value_type, OtherCheckPolicy > &anImg) |
| Same as function qgar::GenImage::timesEqual. | |
Functional operators | |
| |
| template<template< class > class OtherCheckPolicy> | |
| 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. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage & | plusEqual (const GenImage< value_type, OtherCheckPolicy > &anImg) throw (QgarErrorDomain) |
| Add a given image to the current image. | |
| template<template< class > class OtherCheckPolicy> | |
| 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. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage & | minusEqual (const GenImage< value_type, OtherCheckPolicy > &anImg) throw (QgarErrorDomain) |
| Subtract a given image to the current image. | |
| template<template< class > class OtherCheckPolicy> | |
| 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. | |
| template<template< class > class OtherCheckPolicy> | |
| GenImage & | timesEqual (const GenImage< value_type, OtherCheckPolicy > &anImg) throw (QgarErrorDomain) |
| Multiply a given image by the current image. | |
File storage | |
| void | save (AbstractPbmPlusFile &aPbmPlusFile) const |
| Store current image into a PBM+ file. | |
Border mirroring | |
| int | borderRows (int aRowIdx) const |
| Mirror border rows for convolutions. | |
| int | borderCols (int aColIdx) const |
| Mirror border columns for convolutions. | |
Static Public Member Functions | |
Opening | |
| static void | perform (GreyLevelImage *anImg, unsigned int anOpenSize=1) |
| Perform an opening on a given grey-level image. | |
Protected Member Functions | |
Auxiliaries | |
| void | copyBox (const GenImage< value_type, CheckPolicy > &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 | |
Representation of an image | |
| 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. | |
|
|
Constant pointer to qgar::OpenImage::value_type.
Reimplemented from qgar::GenImage< T, CheckPolicy >. Definition at line 112 of file OpenImage.H. |
|
|
Constant reference to qgar::OpenImage::value_type.
Reimplemented from qgar::GenImage< T, CheckPolicy >. Definition at line 102 of file OpenImage.H. |
|
|
Pointer to qgar::OpenImage::value_type.
Reimplemented from qgar::GenImage< T, CheckPolicy >. Definition at line 107 of file OpenImage.H. |
|
|
Reference to qgar::OpenImage::value_type.
Reimplemented from qgar::GenImage< T, CheckPolicy >. Definition at line 97 of file OpenImage.H. |
|
|
Type of the elements stored in the pixel map.
Reimplemented from qgar::GenImage< T, CheckPolicy >. Definition at line 92 of file OpenImage.H. |
|
||||||||||||
|
Construct from given grey-level image.
Definition at line 57 of file OpenImage.C. References qgar::GenImage< T, CheckPolicy >::width(). |
|
||||||||||
|
Mirror border columns for convolutions.
Definition at line 1052 of file GenImage.TCC. |
|
||||||||||
|
Mirror border rows for convolutions.
Definition at line 1036 of file GenImage.TCC. |
|
|||||||||
|
Get the number of bytes per pixel.
Definition at line 369 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_bytesPerPixel. |
|
||||||||||||||||
|
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.
Definition at line 1074 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_pPixMap, qgar::GenImage< T, CheckPolicy >::height(), qgar::GenImage< T, CheckPolicy >::pPixMap(), qgar::qgFill(), and qgar::GenImage< T, CheckPolicy >::width(). Referenced by qgar::GenImage< T, CheckPolicy >::GenImage(). |
|
||||||||||||||||
|
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.
Definition at line 535 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::setPixel(), qgar::AbstractGenPrimitive< T >::source(), qgar::AbstractGenPrimitive< T >::target(), qgar::GenPoint< T >::x(), and qgar::GenPoint< T >::y(). |
|
|||||||||
|
||||||||||||||
|
Subtract each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.
Definition at line 867 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::GenImage(). Referenced by qgar::GenImage< T, CheckPolicy >::operator-(). |
|
||||||||||||||
|
Subtract a given image to the current image.
Definition at line 877 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::height(), qgar::GenImage< T, CheckPolicy >::pPixMap(), and qgar::GenImage< T, CheckPolicy >::width(). Referenced by qgar::GenImage< T, CheckPolicy >::operator-=(). |
|
||||||||||||||
|
Same as function qgar::GenImage::times.
Definition at line 926 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::times(). |
|
||||||||||||||
|
Same as function qgar::GenImage::timesEqual.
Definition at line 937 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::timesEqual(). |
|
||||||||||||||
|
Same as function qgar::GenImage::plus.
Definition at line 767 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::plus(). |
|
||||||||||||||
|
Same as function qgar::GenImage::plusEqual.
Definition at line 778 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::plusEqual(). |
|
||||||||||||||
|
Same as function qgar::GenImage::minus.
Definition at line 846 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::minus(). |
|
||||||||||||||
|
Same as function qgar::GenImage::minusEqual.
Definition at line 857 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::minusEqual(). |
|
||||||||||
|
Get a pointer on a column of pixels.
Definition at line 453 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_pPixMap. |
|
||||||||||||
|
Perform an opening on a given grey-level image. To be used to perform an opening without preserving the initial image.
Definition at line 88 of file OpenImage.C. References qgar::DilatedImage::perform(), and qgar::ErodedImage::perform(). |
|
||||||||||||||||
|
Get a pixel value.
Definition at line 384 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_width. Referenced by qgar::AbstractGradientImage::dxPixel(), qgar::AbstractGradientImage::dyPixel(), qgar::PruneSmallCCBinaryImage::isNeighbor(), qgar::MapleFile::MapleFile(), and qgar::PruneSmallCCBinaryImage::PruneSmallCCBinaryImage(). |
|
||||||||||||||
|
Add each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.
Definition at line 788 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::GenImage(). Referenced by qgar::GenImage< T, CheckPolicy >::operator+(). |
|
||||||||||||||
|
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.
Definition at line 797 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::height(), qgar::GenImage< T, CheckPolicy >::pPixMap(), and qgar::GenImage< T, CheckPolicy >::width(). Referenced by qgar::GenImage< T, CheckPolicy >::operator+=(). |
|
||||||||||||||||
|
Get a pointer on a given pixel of the image.
Definition at line 432 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_width. |
|
|||||||||
|
||||||||||
|
Get a pointer on a row of pixels.
Definition at line 443 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_width. |
|
||||||||||||||||
|
Get a row of pixels.
Referenced by qgar::CleanedBinaryImage::CleanedBinaryImage(), qgar::LinDilatedImage::dilateAll(), qgar::LinDilatedBinaryImage::dilateAll(), qgar::LinErodedImage::erodeAll(), qgar::LinErodedBinaryImage::erodeAll(), qgar::IsotropicDilatedBinaryImage::IsotropicDilatedBinaryImage(), qgar::NiblackBinaryImage::NiblackBinaryImage(), and qgar::GenImage< T, CheckPolicy >::save(). |
|
||||||||||
|
Store current image into a PBM+ file. The given PBM+ file is opened (in WRITE ONLY mode) at the call, and closed before returning.
Definition at line 1005 of file GenImage.TCC. References qgar::AbstractFile::close(), qgar::AbstractFile::openWONLY(), qgar::AbstractPbmPlusFile::pRow(), qgar::GenImage< T, CheckPolicy >::row(), qgar::AbstractPbmPlusFile::setColCnt(), qgar::AbstractPbmPlusFile::setRowCnt(), and qgar::AbstractPbmPlusFile::writeRow(). |
|
||||||||||||||||
|
Set a given column of pixels.
|
|
||||||||||||||||||||
|
Set a pixel value.
Definition at line 478 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_width. Referenced by qgar::GenImage< T, CheckPolicy >::draw(), and qgar::PruneSmallCCBinaryImage::removeComponent(). |
|
||||||||||||||||
|
Set a given row of pixels.
Referenced by qgar::CleanedBinaryImage::CleanedBinaryImage(), qgar::LinDilatedImage::dilateAll(), qgar::LinDilatedBinaryImage::dilateAll(), qgar::LinErodedImage::erodeAll(), qgar::LinErodedBinaryImage::erodeAll(), qgar::GenImage< T, CheckPolicy >::GenImage(), qgar::IsotropicDilatedBinaryImage::IsotropicDilatedBinaryImage(), and qgar::NiblackBinaryImage::NiblackBinaryImage(). |
|
|||||||||
|
Shallow copy: The pixel map of the current image is not duplicated.
Definition at line 691 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::_bytesPerPixel, qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_pRefCnt. Referenced by qgar::AbstractGradientImage::shallowCopy(). |
|
||||||||||||||
|
Multiply each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.
Definition at line 947 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::GenImage(). Referenced by qgar::GenImage< T, CheckPolicy >::operator *(). |
|
||||||||||||||
|
Multiply a given image by the current image. Multiply each pixel of the given image by the corresponding pixel of the current image and store each result in the pixel map of the current image.
Definition at line 958 of file GenImage.TCC. References qgar::GenImage< T, CheckPolicy >::height(), qgar::GenImage< T, CheckPolicy >::pPixMap(), and qgar::GenImage< T, CheckPolicy >::width(). Referenced by qgar::GenImage< T, CheckPolicy >::operator *=(). |
|
|||||||||
|
|||||
|
Number of bytes per pixel.
Definition at line 1096 of file GenImage.H. Referenced by qgar::GenImage< T, CheckPolicy >::bytesPerPixel(), and qgar::GenImage< T, CheckPolicy >::shallowCopy(). |
|
|||||
|
|||||
|
|||||
|
Reference counter. Its value represent the number of other images with which the current image shares its pixel map. Definition at line 1104 of file GenImage.H. Referenced by qgar::GenImage< T, CheckPolicy >::shallowCopy(), and qgar::GenImage< T, CheckPolicy >::~GenImage(). |
|
|||||