DGtalTools  1.2.0
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_COOL > gradShadeCool
 
DGtal::GradientColorMap< unsigned char, DGtal::CMAP_HOT > gradShadeHot
 

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.

57  : myType(type), hueShade(DGtal::HueShadeColorMap<unsigned char>(0,255)),
58  gradShadeCool(DGtal::GradientColorMap<unsigned char, DGtal::CMAP_COOL> (0,255)),
59  gradShadeHot(DGtal::GradientColorMap<unsigned char, DGtal::CMAP_HOT> (0,255))
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  }
@ GradientMapCool
Definition: sliceViewer.h:54
@ GradientMapHot
Definition: sliceViewer.h:54

References MainWindow::GradientMapCool, MainWindow::GradientMapHot, gradShadeCool, gradShadeHot, hueShade, MainWindow::HueshadeCM, and myType.

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: