PixRGB< T > Class Template Reference

This is the basic RGB pixel class. More...

#include <Image/PixelsTypes.H>

Inheritance diagram for PixRGB< T >:
Inheritance graph
[legend]
Collaboration diagram for PixRGB< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PixRGB (const T val)
template<class T2 >
 PixRGB (const T2 val)
template<class T2 >
 PixRGB (const PixRGB< T2 > &A)
template<class T2 >
 PixRGB (const PixHSV< T2 > &A)
template<class T2 >
 PixRGB (const PixXYZ< T2 > &A)
template<class T2 >
 PixRGB (const PixLab< T2 > &A)
template<class T2 >
 PixRGB (const PixJpegYUV< T2 > &A)
template<class T2 >
 PixRGB (const PixVideoYUV< T2 > &A)
template<class T2 >
 PixRGB (const PixYIQ< T2 > &A)
template<class T2 >
 PixRGB (const PixHSL< T2 > &A)
template<class T2 >
 PixRGB (const PixH2SV1< T2 > &A)
template<class T2 >
 PixRGB (const PixH2SV2< T2 > &A)
template<class T2 >
 PixRGB (const PixHyper< T2, 3 > &A)
 PixRGB (const PixRGB< T > &pix)
 construct pixel from another. Defined here for tech reasons
 PixRGB (const T redval, const T greenval, const T blueval)
 Construct an RGB pixel with given values red, green, blue.
template<class T2 , class T3 , class T4 >
 PixRGB (const T2 redval, const T3 greenval, const T4 blueval)
 Construct from given values, clamping & convertPixing as needed.
void getRGB (T &r, T &g, T &b) const
red () const
 Access red channel.
green () const
 Access green channel.
blue () const
 Access blue channel.
template<class T2 >
void setRed (const T2 redval)
 Set red channel value, clamping & convertPixing as necessary.
template<class T2 >
void setGreen (const T2 greenval)
 Set green channel value, clamping & convertPixing as necessary.
template<class T2 >
void setBlue (const T2 blueval)
 Set blue channel value, clamping & convertPixing as necessary.
template<class T2 , class T3 , class T4 >
void set (const T2 redval, const T3 greenval, const T4 blueval)
 Set all channel values, clamping & convertPixing as necessary.
luminance () const
 Compute luminance as (r + g + b) / 3.
void setHSV (const T h1, const T h2, const T s, const T v)
 special methods added for backwards compat.
void getHSV (T &h1, T &h2, T &s, T &v) const
 special methods added for backwards compat.

Static Public Attributes

static const enum PixType pType = PixTypeRGB
static const size_t myDim = 3

Detailed Description

template<class T>
class PixRGB< T >

This is the basic RGB pixel class.

Derived RGB pixel class from Pixels

Definition at line 581 of file PixelsTypes.H.


Constructor & Destructor Documentation

template<class T>
PixRGB< T >::PixRGB ( const PixRGB< T > &  pix  )  [inline]

construct pixel from another. Defined here for tech reasons

Definition at line 1632 of file PixelsTypes.H.

template<class T>
PixRGB< T >::PixRGB ( const T  redval,
const T  greenval,
const T  blueval 
) [inline]

Construct an RGB pixel with given values red, green, blue.

Definition at line 1637 of file PixelsTypes.H.

template<class T >
template<class T2 , class T3 , class T4 >
PixRGB< T >::PixRGB ( const T2  redval,
const T3  greenval,
const T4  blueval 
) [inline]

Construct from given values, clamping & convertPixing as needed.

Definition at line 1644 of file PixelsTypes.H.


Member Function Documentation

template<class T >
T PixRGB< T >::blue (  )  const [inline]
template<class T>
void PixRGB< T >::getHSV ( T &  h1,
T &  h2,
T &  s,
T &  v 
) const [inline]

special methods added for backwards compat.

Definition at line 1708 of file PixelsTypes.H.

References Pixels< T, 4 >::p.

Referenced by featureClusterVision< FLOAT >::fCVgetImageBaseStats().

template<class T >
T PixRGB< T >::green (  )  const [inline]
template<class T >
T PixRGB< T >::luminance (  )  const [inline]

Compute luminance as (r + g + b) / 3.

Definition at line 1700 of file PixelsTypes.H.

template<class T >
T PixRGB< T >::red (  )  const [inline]
template<class T >
template<class T2 , class T3 , class T4 >
void PixRGB< T >::set ( const T2  redval,
const T3  greenval,
const T4  blueval 
) [inline]

Set all channel values, clamping & convertPixing as necessary.

Definition at line 1692 of file PixelsTypes.H.

Referenced by convertFromString(), ImageSpring< T >::getClusteredImage(), and StimMaker::StimMaker().

template<class T >
template<class T2 >
void PixRGB< T >::setBlue ( const T2  blueval  )  [inline]

Set blue channel value, clamping & convertPixing as necessary.

Definition at line 1685 of file PixelsTypes.H.

Referenced by CINNICstatsRun::colorTable(), convertFromString(), findColorIndex::FACgetColor12(), main(), and overlayStain().

template<class T >
template<class T2 >
void PixRGB< T >::setGreen ( const T2  greenval  )  [inline]

Set green channel value, clamping & convertPixing as necessary.

Definition at line 1678 of file PixelsTypes.H.

Referenced by CINNICstatsRun::colorTable(), convertFromString(), findColorIndex::FACgetColor12(), main(), and overlayStain().

template<class T>
void PixRGB< T >::setHSV ( const T  h1,
const T  h2,
const T  s,
const T  v 
) [inline]

special methods added for backwards compat.

Definition at line 1719 of file PixelsTypes.H.

References H1, and H2.

template<class T >
template<class T2 >
void PixRGB< T >::setRed ( const T2  redval  )  [inline]

Set red channel value, clamping & convertPixing as necessary.

Definition at line 1671 of file PixelsTypes.H.

Referenced by CINNICstatsRun::colorTable(), convertFromString(), findColorIndex::FACgetColor12(), main(), and overlayStain().


The documentation for this class was generated from the following file:
Generated on Sun May 8 08:43:38 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3