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

qgar::GenImage_BoundCheck< T > Class Template Reference
[Images]

#include <qgarlib/GenImage_BoundCheck.H>

List of all members.


Detailed Description

template<typename T>
class qgar::GenImage_BoundCheck< T >

Policy to check bounds of pixel values.

Author:
Jan Rendek
Date:
November 5, 2003 7:47
Since:
Qgar 2.1.1

Definition at line 135 of file GenImage.H.

Public Member Functions

Constructors
 GenImage_BoundCheck ()
 Default constructor.
 GenImage_BoundCheck (T aLowerBnd, T anUpperBnd)
 Construct from bounds.
Checking
void checkPixel (const T &aPixel) const throw (QgarErrorDomain)
 Check that a pixel value is between the bounds.
void checkRange (const T *const aPPixmap, int aWidth, const BoundingBox &aRange) const throw (QgarErrorDomain)
 Check that all the pixel values is between the bounds.
Accessor
lowerBound () const
 Get lower bound.
upperBound () const
 Get upper bound.
Mutator
void setLowerBound (const T &aBound)
 Set lower bound.
void setUpperBound (const T &aBound)
 Set upper bound.

Private Attributes

Bounds
_lowerBound
 Lower bound of pixel value.
_upperBound
 Upper bound of pixel value.


Constructor & Destructor Documentation

template<typename T>
qgar::GenImage_BoundCheck< T >::GenImage_BoundCheck  )  [inline]
 

Default constructor.

Lower and upper bounds are intialized to zero.

Definition at line 151 of file GenImage.H.

template<typename T>
qgar::GenImage_BoundCheck< T >::GenImage_BoundCheck aLowerBnd,
anUpperBnd
[inline]
 

Construct from bounds.

Parameters:
aLowerBnd lower bound
anUpperBnd upper bound

Definition at line 166 of file GenImage.H.


Member Function Documentation

template<typename T>
void qgar::GenImage_BoundCheck< T >::checkPixel const T &  aPixel  )  const throw (QgarErrorDomain) [inline]
 

Check that a pixel value is between the bounds.

Parameters:
aPixel a pixel value
Exceptions:
qgar::QgarErrorDomain (pixel value out of range)

Definition at line 190 of file GenImage.H.

References qgar::GenImage_BoundCheck< T >::_upperBound.

Referenced by qgar::GenImage_BoundCheck< T >::checkRange().

template<typename T>
void qgar::GenImage_BoundCheck< T >::checkRange const T *const   aPPixmap,
int  aWidth,
const BoundingBox aRange
const throw (QgarErrorDomain) [inline]
 

Check that all the pixel values is between the bounds.

Parameters:
aPPixmap a pointer to the pixel map of an image
aWidth 
aRange 
Exceptions:
qgar::QgarErrorDomain (pixel value out of range)

Definition at line 216 of file GenImage.H.

References qgar::GenImage_BoundCheck< T >::checkPixel().

template<typename T>
T qgar::GenImage_BoundCheck< T >::lowerBound  )  const [inline]
 

Get lower bound.

Definition at line 239 of file GenImage.H.

References qgar::GenImage_BoundCheck< T >::_lowerBound.

template<typename T>
void qgar::GenImage_BoundCheck< T >::setLowerBound const T &  aBound  )  [inline]
 

Set lower bound.

Parameters:
aBound new value of the lower bound

Definition at line 264 of file GenImage.H.

References qgar::GenImage_BoundCheck< T >::_lowerBound.

template<typename T>
void qgar::GenImage_BoundCheck< T >::setUpperBound const T &  aBound  )  [inline]
 

Set upper bound.

Parameters:
aBound new value of the upper bound

Definition at line 274 of file GenImage.H.

References qgar::GenImage_BoundCheck< T >::_upperBound.

template<typename T>
T qgar::GenImage_BoundCheck< T >::upperBound  )  const [inline]
 

Get upper bound.

Definition at line 247 of file GenImage.H.

References qgar::GenImage_BoundCheck< T >::_upperBound.


Member Data Documentation

template<typename T>
T qgar::GenImage_BoundCheck< T >::_lowerBound [private]
 

Lower bound of pixel value.

Definition at line 295 of file GenImage.H.

Referenced by qgar::GenImage_BoundCheck< T >::lowerBound(), and qgar::GenImage_BoundCheck< T >::setLowerBound().

template<typename T>
T qgar::GenImage_BoundCheck< T >::_upperBound [private]
 

Upper bound of pixel value.

Definition at line 300 of file GenImage.H.

Referenced by qgar::GenImage_BoundCheck< T >::checkPixel(), qgar::GenImage_BoundCheck< T >::setUpperBound(), and qgar::GenImage_BoundCheck< T >::upperBound().


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