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

#include <itkScalarToRGBPixelFunctor.h>

Public Types

using RGBComponentType = unsigned char
 
using RGBPixelType = RGBPixel< RGBComponentType >
 
using ScalarType = TScalar
 

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

Private Attributes

unsigned int m_ColorIndex [3]
 
bool m_UseMSBForHashing
 

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 successfully 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 discernible colors.

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

Definition at line 44 of file itkScalarToRGBPixelFunctor.h.

Member Typedef Documentation

◆ RGBComponentType

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

Definition at line 51 of file itkScalarToRGBPixelFunctor.h.

◆ RGBPixelType

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

Definition at line 52 of file itkScalarToRGBPixelFunctor.h.

◆ ScalarType

template<typename TScalar >
using itk::Functor::ScalarToRGBPixelFunctor< TScalar >::ScalarType = TScalar

Definition at line 53 of file itkScalarToRGBPixelFunctor.h.

Constructor & Destructor Documentation

◆ ScalarToRGBPixelFunctor()

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

◆ ~ScalarToRGBPixelFunctor()

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

Member Function Documentation

◆ GetUseMSBForHashing()

template<typename TScalar >
bool itk::Functor::ScalarToRGBPixelFunctor< TScalar >::GetUseMSBForHashing ( ) const
inline

Definition at line 77 of file itkScalarToRGBPixelFunctor.h.

◆ operator()()

template<typename TScalar >
RGBPixelType itk::Functor::ScalarToRGBPixelFunctor< TScalar >::operator() ( const TScalar &  ) const

◆ SetBigEndian()

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

Definition at line 65 of file itkScalarToRGBPixelFunctor.h.

◆ SetLittleEndian()

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

Definition at line 59 of file itkScalarToRGBPixelFunctor.h.

◆ SetUseMSBForHashing()

template<typename TScalar >
void itk::Functor::ScalarToRGBPixelFunctor< TScalar >::SetUseMSBForHashing ( bool  value)
inline

Definition at line 71 of file itkScalarToRGBPixelFunctor.h.

◆ UseMSBForHashingOff()

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

Definition at line 89 of file itkScalarToRGBPixelFunctor.h.

◆ UseMSBForHashingOn()

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

Definition at line 83 of file itkScalarToRGBPixelFunctor.h.

Member Data Documentation

◆ m_ColorIndex

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

Definition at line 97 of file itkScalarToRGBPixelFunctor.h.

◆ m_UseMSBForHashing

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

Definition at line 96 of file itkScalarToRGBPixelFunctor.h.


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