DGtalTools  1.5.beta
Public Member Functions | Data Fields
MainWindow::ColorMapFunctor Struct Reference

#include <visualisation/sliceViewer.h>

Public Member Functions

 ColorMapFunctor (const ColorMapType type)
 
unsigned int operator() (unsigned char aVal) const
 

Data Fields

ColorMapType myType
 
DGtal::HueShadeColorMap< unsigned char > hueShade
 
DGtal::GradientColorMap< unsigned char, DGtal::CMAP_COOLgradShadeCool
 
DGtal::GradientColorMap< unsigned char, DGtal::CMAP_HOTgradShadeHot
 

Detailed Description

Definition at line 56 of file sliceViewer.h.

Constructor & Destructor Documentation

◆ ColorMapFunctor()

MainWindow::ColorMapFunctor::ColorMapFunctor ( const ColorMapType  type)
inline

Definition at line 57 of file sliceViewer.h.

60 
61 
62  {
63  };
DGtal::GradientColorMap< unsigned char, DGtal::CMAP_HOT > gradShadeHot
Definition: sliceViewer.h:89
DGtal::GradientColorMap< unsigned char, DGtal::CMAP_COOL > gradShadeCool
Definition: sliceViewer.h:88
DGtal::HueShadeColorMap< unsigned char > hueShade
Definition: sliceViewer.h:87

Member Function Documentation

◆ operator()()

unsigned int MainWindow::ColorMapFunctor::operator() ( unsigned char  aVal) const
inline

Definition at line 65 of file sliceViewer.h.

66  {
67  DGtal::Color col;
68  if(myType == HueshadeCM)
69  {
70  col = hueShade((unsigned int)aVal);
71  }
72  else if(myType == GradientMapHot)
73  {
74  col = gradShadeHot((unsigned int)aVal);
75  }
76  else if(myType == GradientMapCool)
77  {
78  col = gradShadeCool((unsigned int)aVal);
79  }
80  else
81  {
82  col = DGtal::Color(aVal);
83  }
84  return (((unsigned int) col.red()) << 16)| (((unsigned int) col.green()) << 8)|((unsigned int) col.blue());
85  }
void green(const unsigned char aGreenValue)
void red(const unsigned char aRedValue)
void blue(const unsigned char aBlueValue)
@ GradientMapCool
Definition: sliceViewer.h:54
@ GradientMapHot
Definition: sliceViewer.h:54

References DGtal::Color::blue(), MainWindow::GradientMapCool, MainWindow::GradientMapHot, gradShadeCool, gradShadeHot, DGtal::Color::green(), hueShade, MainWindow::HueshadeCM, myType, and DGtal::Color::red().

Field Documentation

◆ gradShadeCool

DGtal::GradientColorMap<unsigned char, DGtal::CMAP_COOL> MainWindow::ColorMapFunctor::gradShadeCool

Definition at line 88 of file sliceViewer.h.

Referenced by operator()().

◆ gradShadeHot

DGtal::GradientColorMap<unsigned char, DGtal::CMAP_HOT> MainWindow::ColorMapFunctor::gradShadeHot

Definition at line 89 of file sliceViewer.h.

Referenced by operator()().

◆ hueShade

DGtal::HueShadeColorMap<unsigned char> MainWindow::ColorMapFunctor::hueShade

Definition at line 87 of file sliceViewer.h.

Referenced by operator()().

◆ myType

ColorMapType MainWindow::ColorMapFunctor::myType

Definition at line 86 of file sliceViewer.h.

Referenced by operator()().


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