ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
itk::Functor::ScalarToRGBPixelFunctor< TScalar > Class Template Reference

#include <itkScalarToRGBPixelFunctor.h>

Detailed Description

template<typename TScalar>
class itk::Functor::ScalarToRGBPixelFunctor< TScalar >

A Function object which maps a scalar value into an RGB pixel value.

This class is useful for visualizing labeled images which cannot be mapped succefully into grayscale images. Images of unsigned long integers, for example, may have too many graylevels to visualize effectively.

The hashing scheme used is designed to spread close scalar values of very different colors by using the least significant bits (fastest changing) of the scalar type to determine the color. Because labeled images may typically use sequential values, it is desirable that those values result in easily discernable colors.

Examples:
Examples/Segmentation/WatershedSegmentation1.cxx, and Examples/Segmentation/WatershedSegmentation2.cxx.

Definition at line 44 of file itkScalarToRGBPixelFunctor.h.

Public Types

typedef unsigned char RGBComponentType
 
typedef RGBPixel
< RGBComponentType
RGBPixelType
 
typedef TScalar ScalarType
 

Public Member Functions

bool GetUseMSBForHashing () const
 
RGBPixelType operator() (const TScalar &) const
 
 ScalarToRGBPixelFunctor ()
 
void SetBigEndian ()
 
void SetLittleEndian ()
 
void SetUseMSBForHashing (bool value)
 
void UseMSBForHashingOff ()
 
void UseMSBForHashingOn ()
 
 ~ScalarToRGBPixelFunctor ()
 

Private Attributes

unsigned int m_ColorIndex [3]
 
bool m_UseMSBForHashing
 

Member Typedef Documentation

template<typename TScalar >
typedef unsigned char itk::Functor::ScalarToRGBPixelFunctor< TScalar >::RGBComponentType

Definition at line 50 of file itkScalarToRGBPixelFunctor.h.

template<typename TScalar >
typedef RGBPixel< RGBComponentType > itk::Functor::ScalarToRGBPixelFunctor< TScalar >::RGBPixelType

Definition at line 51 of file itkScalarToRGBPixelFunctor.h.

template<typename TScalar >
typedef TScalar itk::Functor::ScalarToRGBPixelFunctor< TScalar >::ScalarType

Definition at line 52 of file itkScalarToRGBPixelFunctor.h.

Constructor & Destructor Documentation

template<typename TScalar >
itk::Functor::ScalarToRGBPixelFunctor< TScalar >::ScalarToRGBPixelFunctor ( )
template<typename TScalar >
itk::Functor::ScalarToRGBPixelFunctor< TScalar >::~ScalarToRGBPixelFunctor ( )
inline

Definition at line 48 of file itkScalarToRGBPixelFunctor.h.

Member Function Documentation

template<typename TScalar >
bool itk::Functor::ScalarToRGBPixelFunctor< TScalar >::GetUseMSBForHashing ( ) const
inline
template<typename TScalar >
RGBPixelType itk::Functor::ScalarToRGBPixelFunctor< TScalar >::operator() ( const TScalar &  ) const
template<typename TScalar >
void itk::Functor::ScalarToRGBPixelFunctor< TScalar >::SetBigEndian ( )
inline
template<typename TScalar >
void itk::Functor::ScalarToRGBPixelFunctor< TScalar >::SetLittleEndian ( )
inline
template<typename TScalar >
void itk::Functor::ScalarToRGBPixelFunctor< TScalar >::SetUseMSBForHashing ( bool  value)
inline
template<typename TScalar >
void itk::Functor::ScalarToRGBPixelFunctor< TScalar >::UseMSBForHashingOff ( )
inline
template<typename TScalar >
void itk::Functor::ScalarToRGBPixelFunctor< TScalar >::UseMSBForHashingOn ( )
inline

Member Data Documentation

template<typename TScalar >
unsigned int itk::Functor::ScalarToRGBPixelFunctor< TScalar >::m_ColorIndex[3]
private

Definition at line 89 of file itkScalarToRGBPixelFunctor.h.

template<typename TScalar >
bool itk::Functor::ScalarToRGBPixelFunctor< TScalar >::m_UseMSBForHashing
private

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