imaging::GrayValue Class Reference
[Image Module]

Class for 8-bit grayscale values. More...

#include <GrayValue.hpp>

List of all members.

Public Member Functions

 GrayValue (const GrayValue &value)
 GrayValue (const Color &c_value)
 GrayValue (unsigned char value)
 GrayValue (float_t value)
GrayValueoperator= (GrayValue gray_value)
GrayValueoperator= (unsigned char value)
GrayValueoperator= (float_t value)
 operator unsigned char () const
 operator float_t () const

Detailed Description

Class for 8-bit grayscale values.

Objects of this class represent 8-bit pixel values, which are internally stored as an integer from 0 to 255. If GrayValue objects are evalued as floating point objects (by calling operator float_t() or GrayValue(float_t) the value is scaled to the interval [0, 1].

See also:

Constructor & Destructor Documentation

imaging::GrayValue::GrayValue ( const GrayValue value  )  [inline]

Copy constructor.

imaging::GrayValue::GrayValue ( const Color c_value  )  [explicit]

Construct a gray value from the colour value c_value. This function sets the gray value to the average of the red, green and blue values of c_value.

imaging::GrayValue::GrayValue ( unsigned char  value  )  [inline, explicit]

Construct a gray value from value.

imaging::GrayValue::GrayValue ( float_t  value  )  [inline, explicit]

Construct a gray value from value. The input value is multiplied by 255 and then converted to an 8-bit value.

Member Function Documentation

GrayValue& imaging::GrayValue::operator= ( GrayValue  gray_value  )  [inline]

Assignement operator.

References _value.

GrayValue& imaging::GrayValue::operator= ( unsigned char  value  )  [inline]

Assignement operator.

GrayValue& imaging::GrayValue::operator= ( float_t  value  )  [inline]

Assignement operator.

imaging::GrayValue::operator unsigned char (  )  const [inline]

Type cast to unsigned char.

imaging::GrayValue::operator float_t (  )  const [inline]

Type cast to float_t. The grayscale value is converted to floating point precision and divided by 255.

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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5