Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::GradientModuleImage Class Reference
[Gradients and Laplacians]

#include <qgarlib/GradientModuleImage.H>

Inheritance diagram for qgar::GradientModuleImage:

qgar::GenImage< T, CheckPolicy > List of all members.

Detailed Description

Module of the Gradient of an image.

Definition at line 65 of file GradientModuleImage.H.

Public Types

Types
typedef FloatImage::value_type value_type
 Type of the elements stored in the pixmap.
typedef value_typereference
 Reference to qgar::GenImage::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::GenImage::value_type.
typedef value_typepointer
 Pointer to qgar::GenImage::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::GenImage::value_type.

Public Member Functions

Constructors
 GradientModuleImage (AbstractGradientImage &aGradImg)
 Construct from given gradient 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
Warning:
Using stand-alone versions of operators (operator+, operator-, operator*) is much less efficient then using assignment versions (operator+=, operator-=, operator*=). For example, an expression like:
    res = a + b - c;
uses 2 temporary objects, one for each call to operator+ and operator-(the pixel map of the last temporary object is then copied into the pixel map of res). These considerations also apply to functional operators (see the corresponding section). To preserve efficiency, the code should be written in this way:
    res = a;
    res += b;  // no temporary needed
    res -= c;  // no temporary needed


template<template< class > class OtherCheckPolicy>
GenImage< value_type, GenImage_NoCheckoperator+ (const GenImage< value_type, OtherCheckPolicy > &anImg) const
 Same as function qgar::GenImage::plus.
template<template< class > class OtherCheckPolicy>
GenImageoperator+= (const GenImage< value_type, OtherCheckPolicy > &anImg)
 Same as function qgar::GenImage::plusEqual.
template<template< class > class OtherCheckPolicy>
GenImage< value_type, GenImage_NoCheckoperator- (const GenImage< value_type, OtherCheckPolicy > &anImg) const
 Same as function qgar::GenImage::minus.
template<template< class > class OtherCheckPolicy>
GenImageoperator-= (const GenImage< value_type, OtherCheckPolicy > &anImg)
 Same as function qgar::GenImage::minusEqual.
template<template< class > class OtherCheckPolicy>
GenImage< value_type, GenImage_NoCheckoperator * (const GenImage< value_type, OtherCheckPolicy > &anImg) const
 Same as function qgar::GenImage::times.
template<template< class > class OtherCheckPolicy>
GenImageoperator *= (const GenImage< value_type, OtherCheckPolicy > &anImg)
 Same as function qgar::GenImage::timesEqual.
Functional operators
Warning:
Using stand-alone versions of these functions (plus, minus, times) is much less efficient then using assignment versions (plusEqual, minusEqual, timesEqual). For example, an expression like:
    res = a.plus(b).minus(c);
uses 2 temporary objects, one for each call to plusEqual and minusEqual (the pixel map of the last temporary object is then copied into the pixel map of res). These considerations also apply to operators (see the corresponding section). To preserve efficiency, the code should be written in this way:
    res = a;
    res.plusEqual(b);   // no temporary needed
    res.minusEqual(c);  // no temporary needed
Operators implementation uses Scott Meyers' tips from [Meyer, 1996]: item #22, pages 107-110.

template<template< class > class OtherCheckPolicy>
GenImage< value_type, GenImage_NoCheckplus (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>
GenImageplusEqual (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_NoCheckminus (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>
GenImageminusEqual (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_NoChecktimes (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>
GenImagetimesEqual (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.

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.


Member Typedef Documentation

typedef const value_type* qgar::GradientModuleImage::const_pointer
 

Constant pointer to qgar::GenImage::value_type.

Reimplemented from qgar::GenImage< T, CheckPolicy >.

Definition at line 103 of file GradientModuleImage.H.

typedef const value_type& qgar::GradientModuleImage::const_reference
 

Constant reference to qgar::GenImage::value_type.

Reimplemented from qgar::GenImage< T, CheckPolicy >.

Definition at line 93 of file GradientModuleImage.H.

typedef value_type* qgar::GradientModuleImage::pointer
 

Pointer to qgar::GenImage::value_type.

Reimplemented from qgar::GenImage< T, CheckPolicy >.

Definition at line 98 of file GradientModuleImage.H.

typedef value_type& qgar::GradientModuleImage::reference
 

Reference to qgar::GenImage::value_type.

Reimplemented from qgar::GenImage< T, CheckPolicy >.

Definition at line 88 of file GradientModuleImage.H.

typedef FloatImage::value_type qgar::GradientModuleImage::value_type
 

Type of the elements stored in the pixmap.

Reimplemented from qgar::GenImage< T, CheckPolicy >.

Definition at line 83 of file GradientModuleImage.H.


Constructor & Destructor Documentation

qgar::GradientModuleImage::GradientModuleImage AbstractGradientImage aGradImg  )  [explicit]
 

Construct from given gradient image.

Parameters:
aGradImg a Gradient image

Definition at line 59 of file GradientModuleImage.C.

References qgar::GenImage< T, CheckPolicy >::_height, qgar::GenImage< T, CheckPolicy >::_pPixMap, qgar::GenImage< T, CheckPolicy >::_width, qgar::AbstractGradientImage::dxImg(), and qgar::AbstractGradientImage::dyImg().


Member Function Documentation

template<class T, template< class > class CheckPolicy>
int qgar::GenImage< T, CheckPolicy >::borderCols int  aColIdx  )  const [inherited]
 

Mirror border columns for convolutions.

Parameters:
aColIdx index of the column

Definition at line 1052 of file GenImage.TCC.

template<class T, template< class > class CheckPolicy>
int qgar::GenImage< T, CheckPolicy >::borderRows int  aRowIdx  )  const [inherited]
 

Mirror border rows for convolutions.

Parameters:
aRowIdx index of the row

Definition at line 1036 of file GenImage.TCC.

template<class T, template< class > class CheckPolicy>
int qgar::GenImage< T, CheckPolicy >::bytesPerPixel  )  const [inline, inherited]
 

Get the number of bytes per pixel.

Definition at line 369 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::_bytesPerPixel.

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
void qgar::GenImage< T, CheckPolicy >::column unsigned int  aColIdx,
pointer  aCol
const [inherited]
 

Get a column of pixels.

Parameters:
aColIdx column index in image
aCol buffer to store the column of pixels
Warning:
The behavior of the function is undefined if the buffer size is smaller than the column size.

template<class T, template< class > class CheckPolicy>
void qgar::GenImage< T, CheckPolicy >::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)
[protected, inherited]
 

Copy a rectangular area of the given image into the current image.

The sides of the rectangle are parallel to the coordinate axis.

Parameters:
anImg initial image
aXTopLeft X coordinate of the area top left corner
aYTopLeft Y coordinate of the area left corner
aXBottomRight X coordinate of the area bottom right corner
aYBottomRight Y coordinate of the area bottom right corner
aPixVal pixel value to fill non-overlaping zones (default (T)0)
Warning:
The intersection between the rectangle and the given image must be non-empty. If the overlaping zone is only partial, the non-overlaping zone(s) are filled with pixels having value aPixVal.
Todo:
To be reimplemented.

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().

template<class T, template< class > class CheckPolicy>
void qgar::GenImage< T, CheckPolicy >::draw const Segment aSeg,
value_type  aPixVal = (value_type) 1
[inherited]
 

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.

Parameters:
aSeg segment to be drawn
aPixVal value to set pixels with (default (T)1)

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().

template<class T, template< class > class CheckPolicy>
int qgar::GenImage< T, CheckPolicy >::height  )  const [inline, inherited]
 

Get the image height.

Definition at line 359 of file GenImage.TCC.

Referenced by qgar::GenImage< T, CheckPolicy >::copyBox(), qgar::PruneSmallCCBinaryImage::isNeighbor(), qgar::LabeledSkeletonImage::LabeledSkeletonImage(), qgar::LinkedChainList::LinkedChainList(), qgar::MapleFile::MapleFile(), qgar::GenImage< T, CheckPolicy >::minusEqual(), qgar::GenImage< T, CheckPolicy >::operator=(), qgar::UltimateErodedBinaryImage::perform(), qgar::GeodesicRecImage::perform(), qgar::GeodesicRecEroImage::perform(), qgar::GeodesicRecEroBinaryImage::perform(), qgar::GeodesicRecBinaryImage::perform(), qgar::GenImage< T, CheckPolicy >::plusEqual(), qgar::PruneSmallCCBinaryImage::PruneSmallCCBinaryImage(), qgar::GenImage< T, CheckPolicy >::timesEqual(), and qgar::TTBinaryImage::TTBinaryImage().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, GenImage_NoCheck > qgar::GenImage< T, CheckPolicy >::minus const GenImage< value_type, OtherCheckPolicy > &  anImg  )  const [inherited]
 

Subtract each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.

Returns:
A new image constructed from this new pixel map
Parameters:
anImg image to be subtracted to the current image
Warning:
Given and current images must have the same width and height. The subtraction is not normalized: Each result is stored in the new pixel map without any checking.

Definition at line 867 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::GenImage().

Referenced by qgar::GenImage< T, CheckPolicy >::operator-().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, CheckPolicy > & qgar::GenImage< T, CheckPolicy >::minusEqual const GenImage< value_type, OtherCheckPolicy > &  anImg  )  throw (QgarErrorDomain) [inherited]
 

Subtract a given image to the current image.

Parameters:
anImg image to be subtracted to the current image
Subtract 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.

Warning:
Given and current images must have the same width and height. The subtraction is not normalized: Each result is stored in the pixel map of the current image without any checking.
Exceptions:
qgar::QgarErrorDomain (image sizes do not match)

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-=().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, GenImage_NoCheck > qgar::GenImage< T, CheckPolicy >::operator * const GenImage< value_type, OtherCheckPolicy > &  anImg  )  const [inherited]
 

Same as function qgar::GenImage::times.

Definition at line 926 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::times().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, CheckPolicy > & qgar::GenImage< T, CheckPolicy >::operator *= const GenImage< value_type, OtherCheckPolicy > &  anImg  )  [inherited]
 

Same as function qgar::GenImage::timesEqual.

Definition at line 937 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::timesEqual().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, GenImage_NoCheck > qgar::GenImage< T, CheckPolicy >::operator+ const GenImage< value_type, OtherCheckPolicy > &  anImg  )  const [inherited]
 

Same as function qgar::GenImage::plus.

Definition at line 767 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::plus().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, CheckPolicy > & qgar::GenImage< T, CheckPolicy >::operator+= const GenImage< value_type, OtherCheckPolicy > &  anImg  )  [inherited]
 

Same as function qgar::GenImage::plusEqual.

Definition at line 778 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::plusEqual().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, GenImage_NoCheck > qgar::GenImage< T, CheckPolicy >::operator- const GenImage< value_type, OtherCheckPolicy > &  anImg  )  const [inherited]
 

Same as function qgar::GenImage::minus.

Definition at line 846 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::minus().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, CheckPolicy > & qgar::GenImage< T, CheckPolicy >::operator-= const GenImage< value_type, OtherCheckPolicy > &  anImg  )  [inherited]
 

Same as function qgar::GenImage::minusEqual.

Definition at line 857 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::minusEqual().

template<class T, template< class > class CheckPolicy>
T * qgar::GenImage< T, CheckPolicy >::pColumn unsigned int  aColIdx  )  const [inline, inherited]
 

Get a pointer on a column of pixels.

Parameters:
aColIdx column index in image

Definition at line 453 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::_pPixMap.

template<class T, template< class > class CheckPolicy>
T qgar::GenImage< T, CheckPolicy >::pixel unsigned int  aX,
unsigned int  aY
const [inherited]
 

Get a pixel value.

Parameters:
aX X coordinate (column index) of the pixel
aY Y coordinate (row index) of the pixel

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().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, GenImage_NoCheck > qgar::GenImage< T, CheckPolicy >::plus const GenImage< value_type, OtherCheckPolicy > &  anImg  )  const [inherited]
 

Add each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.

Parameters:
anImg image to be added to the current image
Returns:
A new image constructed from this new pixel map
Warning:
Given and current images must have the same width and height. The addition is not normalized: Each result is stored in the new pixel map without any checking.

Definition at line 788 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::GenImage().

Referenced by qgar::GenImage< T, CheckPolicy >::operator+().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, CheckPolicy > & qgar::GenImage< T, CheckPolicy >::plusEqual const GenImage< value_type, OtherCheckPolicy > &  anImg  )  throw (QgarErrorDomain) [inherited]
 

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.

Parameters:
anImg image to be added to the current image
Warning:
Given and current images must have the same width and height. The addition is not normalized: Each result is stored in the pixel map of the current image without any checking.
Exceptions:
qgar::QgarErrorDomain (image sizes do not match)

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+=().

template<class T, template< class > class CheckPolicy>
T * qgar::GenImage< T, CheckPolicy >::pPixel unsigned int  aRowIdx,
unsigned int  aColIdx
const [inline, inherited]
 

Get a pointer on a given pixel of the image.

Parameters:
aRowIdx row index of the pixel
aColIdx column index of the pixel

Definition at line 432 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_width.

template<class T, template< class > class CheckPolicy>
T * qgar::GenImage< T, CheckPolicy >::pPixMap  )  const [inline, inherited]
 

Get the pointer to the pixel map.

Definition at line 463 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::_pPixMap.

Referenced by qgar::AbstractGradientImage::AbstractGradientImage(), qgar::LinkedChainList::aChain(), qgar::GenImage< T, CheckPolicy >::copyBox(), qgar::DericheGradientImage::dfilterX(), qgar::DericheGradientImage::dfilterY(), qgar::Dist34BlackCCImage::Dist34BlackCCImage(), qgar::Dist34Image::Dist34Image(), qgar::GenImage< T, CheckPolicy >::GenImage(), qgar::GradientLocalMaxImage::GradientLocalMaxImage(), qgar::LinkedChainList::LinkedChainList(), qgar::ConnectedComponents::makeBinaryImg(), qgar::GenImage< T, CheckPolicy >::minusEqual(), qgar::NiblackBinaryImage::NiblackBinaryImage(), qgar::GenImage< T, CheckPolicy >::operator=(), qgar::UltimateErodedBinaryImage::perform(), qgar::GeodesicRecImage::perform(), qgar::GeodesicRecEroImage::perform(), qgar::GeodesicRecEroBinaryImage::perform(), qgar::GeodesicRecBinaryImage::perform(), qgar::GenImage< T, CheckPolicy >::plusEqual(), qgar::Component::PRIVATEcomputeContour(), qgar::ThresBinaryImage::ThresBinaryImage(), qgar::GenImage< T, CheckPolicy >::timesEqual(), qgar::TTBinaryImage::TTBinaryImage(), qgar::GenConvolImage< T, CheckingPolicy >::xconvol(), and qgar::GenConvolImage< T, CheckingPolicy >::yconvol().

template<class T, template< class > class CheckPolicy>
T * qgar::GenImage< T, CheckPolicy >::pRow unsigned int  aRowIdx  )  const [inline, inherited]
 

Get a pointer on a row of pixels.

Parameters:
aRowIdx row index in image

Definition at line 443 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::_pPixMap, and qgar::GenImage< T, CheckPolicy >::_width.

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
void qgar::GenImage< T, CheckPolicy >::row unsigned int  aRowIdx,
pointer  aRow
const [inherited]
 

Get a row of pixels.

Parameters:
aRowIdx row index in image
aRow buffer to store the row of pixels
Warning:
The behavior of the function is undefined if the buffer size is smaller than the row size.

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().

template<class T, template< class > class CheckPolicy>
void qgar::GenImage< T, CheckPolicy >::save AbstractPbmPlusFile aPbmPlusFile  )  const [inherited]
 

Store current image into a PBM+ file.

The given PBM+ file is opened (in WRITE ONLY mode) at the call, and closed before returning.

Parameters:
aPbmPlusFile a PBM+ file

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().

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
void qgar::GenImage< T, CheckPolicy >::setColumn unsigned int  aColIdx,
const_pointer const   aCol
[inherited]
 

Set a given column of pixels.

Parameters:
aColIdx column index in image
aCol column of pixels to store into the pixel map

template<class T, template< class > class CheckPolicy>
void qgar::GenImage< T, CheckPolicy >::setPixel unsigned int  aX,
unsigned int  aY,
value_type  aPixVal
[inherited]
 

Set a pixel value.

Parameters:
aX X coordinate (column index) of the pixel
aY Y coordinate (row index) of the pixel
aPixVal value of the pixel

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().

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
void qgar::GenImage< T, CheckPolicy >::setRow unsigned int  aRowIdx,
const_pointer const   aRow
[inherited]
 

Set a given row of pixels.

Parameters:
aRowIdx row index in image
aRow row of pixels to store into the pixel map

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().

template<class T, template< class > class CheckPolicy>
GenImage< T, CheckPolicy > qgar::GenImage< T, CheckPolicy >::shallowCopy  )  [inherited]
 

Shallow copy: The pixel map of the current image is not duplicated.

See also:
qgar::GenImage::operator= and copy constructor.
Warning:
When the copy is completed, the pixel map of the new image is the same memory space as the pixel map of the current image.

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().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, GenImage_NoCheck > qgar::GenImage< T, CheckPolicy >::times const GenImage< value_type, OtherCheckPolicy > &  anImg  )  const [inherited]
 

Multiply each pixel of the given image to the corresponding pixel of the current image and store each result in a new pixel map.

Parameters:
anImg image to be multiplied by the current image
Returns:
A new image constructed from this new pixel map
Warning:
Given and current images must have the same width and height. The multiplication is not normalized: Each result is stored in the new pixel map without any checking.

Definition at line 947 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::GenImage().

Referenced by qgar::GenImage< T, CheckPolicy >::operator *().

template<class T, template< class > class CheckPolicy>
template<template< class > class OtherCheckPolicy>
GenImage< T, CheckPolicy > & qgar::GenImage< T, CheckPolicy >::timesEqual const GenImage< value_type, OtherCheckPolicy > &  anImg  )  throw (QgarErrorDomain) [inherited]
 

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.

Parameters:
anImg image to be multiplied by the current image
Warning:
Given and current images must have the same width and height. The multiplication is not normalized: Each result is stored in the pixel map of the current image without any checking.
Exceptions:
qgar::QgarErrorDomain (image sizes do not match)

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 *=().

template<class T, template< class > class CheckPolicy>
int qgar::GenImage< T, CheckPolicy >::width  )  const [inline, inherited]
 

Get the image width.

Definition at line 349 of file GenImage.TCC.

References qgar::GenImage< T, CheckPolicy >::_width.

Referenced by qgar::LinkedChainList::aChain(), qgar::CloseBinaryImage::CloseBinaryImage(), qgar::CloseImage::CloseImage(), qgar::GenImage< T, CheckPolicy >::copyBox(), qgar::DilatedBinaryImage::DilatedBinaryImage(), qgar::DilatedImage::DilatedImage(), qgar::Dist34Image::Dist34Image(), qgar::ErodedBinaryImage::ErodedBinaryImage(), qgar::ErodedImage::ErodedImage(), qgar::GeodesicRecBinaryImage::GeodesicRecBinaryImage(), qgar::GeodesicRecEroBinaryImage::GeodesicRecEroBinaryImage(), qgar::GeodesicRecEroImage::GeodesicRecEroImage(), qgar::GeodesicRecImage::GeodesicRecImage(), qgar::PruneSmallCCBinaryImage::isNeighbor(), qgar::LabeledSkeletonImage::LabeledSkeletonImage(), qgar::LinkedChainList::LinkedChainList(), qgar::MapleFile::MapleFile(), qgar::GenImage< T, CheckPolicy >::minusEqual(), qgar::OpenBinaryImage::OpenBinaryImage(), qgar::OpenImage::OpenImage(), qgar::GenImage< T, CheckPolicy >::operator=(), qgar::UltimateErodedBinaryImage::perform(), qgar::GeodesicRecImage::perform(), qgar::GeodesicRecEroImage::perform(), qgar::GeodesicRecEroBinaryImage::perform(), qgar::GeodesicRecBinaryImage::perform(), qgar::GenImage< T, CheckPolicy >::plusEqual(), qgar::Component::PRIVATEcomputeContour(), qgar::PruneSmallCCBinaryImage::processPixel(), qgar::PruneSmallCCBinaryImage::PruneSmallCCBinaryImage(), qgar::GenImage< T, CheckPolicy >::timesEqual(), qgar::TTBinaryImage::TTBinaryImage(), and qgar::PruneSmallCCBinaryImage::unification().


Member Data Documentation

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
unsigned int qgar::GenImage< T, CheckPolicy >::_bytesPerPixel [protected, inherited]
 

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().

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
int qgar::GenImage< T, CheckPolicy >::_height [protected, inherited]
 

Image height.

Definition at line 1114 of file GenImage.H.

Referenced by qgar::CleanedBinaryImage::CleanedBinaryImage(), qgar::GenImage< T, CheckPolicy >::GenImage(), qgar::GradientLocalMaxImage::GradientLocalMaxImage(), GradientModuleImage(), qgar::IsotropicDilatedBinaryImage::IsotropicDilatedBinaryImage(), and qgar::NiblackBinaryImage::NiblackBinaryImage().

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
pointer qgar::GenImage< T, CheckPolicy >::_pPixMap [protected, inherited]
 

Pointer to the pixel map, organized as consecutive rows.

Definition at line 1120 of file GenImage.H.

Referenced by qgar::GenImage< T, CheckPolicy >::copyBox(), qgar::GenImage< T, CheckPolicy >::GenImage(), qgar::GradientLocalMaxImage::GradientLocalMaxImage(), GradientModuleImage(), qgar::GenImage< T, CheckPolicy >::operator=(), qgar::GenImage< T, CheckPolicy >::pColumn(), qgar::GenImage< T, CheckPolicy >::pixel(), qgar::GenImage< T, CheckPolicy >::pPixel(), qgar::GenImage< T, CheckPolicy >::pPixMap(), qgar::GenImage< T, CheckPolicy >::pRow(), qgar::GenImage< T, CheckPolicy >::setPixel(), qgar::GenImage< T, CheckPolicy >::shallowCopy(), and qgar::GenImage< T, CheckPolicy >::~GenImage().

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
int* qgar::GenImage< T, CheckPolicy >::_pRefCnt [protected, inherited]
 

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().

template<class T, template< class > class CheckPolicy = GenImage_NoCheck>
int qgar::GenImage< T, CheckPolicy >::_width [protected, inherited]
 

Image width.

Definition at line 1109 of file GenImage.H.

Referenced by qgar::CleanedBinaryImage::CleanedBinaryImage(), qgar::GenImage< T, CheckPolicy >::GenImage(), qgar::GradientLocalMaxImage::GradientLocalMaxImage(), GradientModuleImage(), qgar::IsotropicDilatedBinaryImage::IsotropicDilatedBinaryImage(), qgar::NiblackBinaryImage::NiblackBinaryImage(), qgar::GenImage< T, CheckPolicy >::pixel(), qgar::GenImage< T, CheckPolicy >::pPixel(), qgar::NiblackBinaryImage::PRIVATEgetBlackLabels(), qgar::GenImage< T, CheckPolicy >::pRow(), qgar::GenImage< T, CheckPolicy >::setPixel(), and qgar::GenImage< T, CheckPolicy >::width().


The documentation for this class was generated from the following files: