18 #ifndef __itkColorTable_h
19 #define __itkColorTable_h
39 template<
class TPixel >
60 void UseDiscreteColors(
void);
66 void UseGrayColors(
unsigned int n = 256);
73 void UseHeatColors(
unsigned int n = 256);
79 void UseRandomColors(
unsigned int n = 256);
82 itkGetConstMacro(NumberOfColors,
unsigned int);
91 bool SetColor(
unsigned int c, TPixel r, TPixel g, TPixel b,
92 const char *name =
"UserDefined");
94 const char *name =
"UserDefined");
100 TPixel GetColorComponent(
unsigned int colorId,
char rgb);
103 std::string GetColorName(
unsigned int colorId);
108 unsigned int GetClosestColorTableId(TPixel r, TPixel g, TPixel b);
112 void PrintSelf(std::ostream & os,
Indent indent)
const;
120 void operator=(
const Self &);
127 #define ITK_TEMPLATE_ColorTable(_, EXPORT, TypeX, TypeY) \
130 _( 1 ( class EXPORT ColorTable< ITK_TEMPLATE_1 TypeX > ) ) \
131 namespace Templates \
133 typedef ColorTable< ITK_TEMPLATE_1 TypeX > \
138 #if ITK_TEMPLATE_EXPLICIT
139 #include "Templates/itkColorTable+-.h"
143 #include "itkColorTable.hxx"