ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkColorTable.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef ColorTable | Self |
typedef Object | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
unsigned int | GetClosestColorTableId (TPixel r, TPixel g, TPixel b) |
RGBPixel< TPixel > | GetColor (unsigned int colorId) |
TPixel | GetColorComponent (unsigned int colorId, char rgb) |
std::string | GetColorName (unsigned int colorId) |
virtual const char * | GetNameOfClass () const |
virtual unsigned int | GetNumberOfColors () const |
void | UseDiscreteColors (void) |
void | UseGrayColors (unsigned int n=256) |
void | UseHeatColors (unsigned int n=256) |
void | UseRandomColors (unsigned int n=256) |
bool | SetColor (unsigned int c, TPixel r, TPixel g, TPixel b, const char *name="UserDefined") |
bool | SetColor (unsigned int c, RGBPixel< TPixel > pixel, const char *name="UserDefined") |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
ColorTable () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
Protected Attributes | |
std::vector< RGBPixel< TPixel > > | m_Color |
std::vector< std::string > | m_ColorName |
unsigned int | m_NumberOfColors |
Private Member Functions | |
ColorTable (const Self &) | |
void | DeleteColors () |
void | operator= (const Self &) |
Define a color table for image visualisation.
Generates color lookup tables of various types. The lookup table value range differs for integral and continuous data types. Consult the documentation for each lookup table generator.
Definition at line 40 of file itkColorTable.h.
typedef SmartPointer< const Self > itk::ColorTable< TPixel >::ConstPointer |
Reimplemented from itk::Object.
Definition at line 47 of file itkColorTable.h.
typedef SmartPointer< Self > itk::ColorTable< TPixel >::Pointer |
Reimplemented from itk::Object.
Definition at line 46 of file itkColorTable.h.
typedef ColorTable itk::ColorTable< TPixel >::Self |
Standard class typedefs.
Reimplemented from itk::Object.
Definition at line 44 of file itkColorTable.h.
typedef Object itk::ColorTable< TPixel >::Superclass |
Reimplemented from itk::Object.
Definition at line 45 of file itkColorTable.h.
itk::ColorTable< TPixel >::ColorTable | ( | ) | [protected] |
itk::ColorTable< TPixel >::ColorTable | ( | const Self & | ) | [private] |
virtual::itk::LightObject::Pointer itk::ColorTable< TPixel >::CreateAnother | ( | void | ) | const [virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
void itk::ColorTable< TPixel >::DeleteColors | ( | ) | [private] |
unsigned int itk::ColorTable< TPixel >::GetClosestColorTableId | ( | TPixel | r, |
TPixel | g, | ||
TPixel | b | ||
) |
Find the color closest to a given pixel. Uses a L2 distance metric.
RGBPixel< TPixel > itk::ColorTable< TPixel >::GetColor | ( | unsigned int | colorId | ) |
Get the color stored at a given index.
TPixel itk::ColorTable< TPixel >::GetColorComponent | ( | unsigned int | colorId, |
char | rgb | ||
) |
Given the position in the table and the color returns the value.
std::string itk::ColorTable< TPixel >::GetColorName | ( | unsigned int | colorId | ) |
Get the name of the color at a given index.
virtual const char* itk::ColorTable< TPixel >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::Object.
virtual unsigned int itk::ColorTable< TPixel >::GetNumberOfColors | ( | ) | const [virtual] |
Get the number of colors in the lookup table.
static Pointer itk::ColorTable< TPixel >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
void itk::ColorTable< TPixel >::operator= | ( | const Self & | ) | [private] |
void itk::ColorTable< TPixel >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
bool itk::ColorTable< TPixel >::SetColor | ( | unsigned int | c, |
TPixel | r, | ||
TPixel | g, | ||
TPixel | b, | ||
const char * | name = "UserDefined" |
||
) |
Set the color at a given index. Optionally provide a name for the color. If a name is not provided, the name "UserDefined" is used.
bool itk::ColorTable< TPixel >::SetColor | ( | unsigned int | c, |
RGBPixel< TPixel > | pixel, | ||
const char * | name = "UserDefined" |
||
) |
Set the color at a given index. Optionally provide a name for the color. If a name is not provided, the name "UserDefined" is used.
void itk::ColorTable< TPixel >::UseDiscreteColors | ( | void | ) |
Generate a lookup table of 8 discrete colors. The colors are Red, Purple, Aqua, Yellow, Green, Blue, Grey0.70, White. For integral pixel types, the color range is bewteen NonpositiveMin() and max(). For continuous types, the range is 0.0 to 1.0.
void itk::ColorTable< TPixel >::UseGrayColors | ( | unsigned int | n = 256 | ) |
Generate a lookuptable of n grayscale values. For integral pixel types, a ramp is generated from NonpositiveMin() to max() of the pixel type. For continuous pixel types, the range is 0.0 to 1.0.
void itk::ColorTable< TPixel >::UseHeatColors | ( | unsigned int | n = 256 | ) |
Generate a lookup table of n values good for showing "temperatures". For integral pixel types, the color range is bewteen NonpositiveMin() and max(). For continuous types, the range is 0.0 to 1.0.
void itk::ColorTable< TPixel >::UseRandomColors | ( | unsigned int | n = 256 | ) |
Generate a lookup table of n random values. For integral pixel types, the color range is between NonpositiveMin() and max(). For continous types, the range is 0.0 to 1.0.
std::vector<RGBPixel< TPixel > > itk::ColorTable< TPixel >::m_Color [protected] |
Definition at line 117 of file itkColorTable.h.
std::vector<std::string> itk::ColorTable< TPixel >::m_ColorName [protected] |
Definition at line 116 of file itkColorTable.h.
unsigned int itk::ColorTable< TPixel >::m_NumberOfColors [protected] |
Definition at line 114 of file itkColorTable.h.