Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::LabeledImageLookupTable Class Reference

#include <mitkLabeledImageLookupTable.h>

Inheritance diagram for mitk::LabeledImageLookupTable:
Collaboration diagram for mitk::LabeledImageLookupTable:

Public Types

typedef unsigned char LabelType
 
- Public Types inherited from mitk::LookupTable
enum  LookupTableType {
  GRAYSCALE, INVERSE_GRAYSCALE, HOT_IRON, JET,
  JET_TRANSPARENT, LEGACY_BINARY, LEGACY_RAINBOW_COLOR, MULTILABEL,
  PET_COLOR, PET_20
}
 The LookupTableType enum for different predefined lookup tables. More...
 
typedef unsigned char RawLookupTableType
 RawLookupTableType raw lookuptable typedef for convenience. More...
 
typedef LookupTable Self
 
typedef itk::DataObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

 mitkClassMacro (LabeledImageLookupTable, LookupTable)
 
Pointer Clone () const
 
LabeledImageLookupTableoperator= (const LookupTable &other) override
 implementation necessary because operator made private in itk::Object More...
 
virtual void SetColorForLabel (const LabelType &label, const double &r, const double &g, const double &b, const double a=1.0)
 
virtual double * GetColorForLabel (const LabelType &label)
 
mitk::LevelWindow GetLevelWindow ()
 
- Public Member Functions inherited from mitk::LookupTable
virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
virtual vtkSmartPointer< vtkLookupTable > GetVtkLookupTable () const
 GetVtkLookupTable Getter for the internally wrapped vtkLookupTable. More...
 
virtual RawLookupTableTypeGetRawLookupTable () const
 GetRawLookupTable Getter for the raw lookuptable array. More...
 
virtual void SetVtkLookupTable (vtkSmartPointer< vtkLookupTable > lut)
 SetVtkLookupTable Setter for the internal lookuptable. More...
 
virtual void ChangeOpacityForAll (float opacity)
 ChangeOpacityForAll Set the opacity for all table values. More...
 
virtual void ChangeOpacity (int index, float opacity)
 ChangeOpacity Set the opacity for a specific table index. More...
 
virtual void GetColor (double value, double rgb[3])
 GetColor convenience method wrapping the vtkLookupTable::GetColor() method. More...
 
virtual void GetTableValue (int index, double rgba[4])
 GetTableValue convenience method wrapping the vtkLookupTable::GetTableValue() method. More...
 
virtual void SetTableValue (int index, double rgba[4])
 SetTableValue convenience method wrapping the vtkLookupTable::SetTableValue() method. More...
 
virtual void SetWindow (float _arg)
 
virtual void SetLevel (float _arg)
 
virtual void SetOpacity (float _arg)
 
virtual bool operator== (const mitk::LookupTable &LookupTable) const
 equality operator implementation More...
 
virtual bool operator!= (const LookupTable &LookupTable) const
 non equality operator implementation More...
 
virtual void UpdateOutputInformation () override
 
virtual void SetRequestedRegionToLargestPossibleRegion () override
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 
virtual bool VerifyRequestedRegion () override
 
virtual void SetRequestedRegion (const itk::DataObject *data) override
 
 LookupTable ()
 
virtual ~LookupTable ()
 
void CreateColorTransferFunction (vtkColorTransferFunction *&colorFunction)
 
void CreateOpacityTransferFunction (vtkPiecewiseFunction *&opacityFunction)
 
void CreateGradientTransferFunction (vtkPiecewiseFunction *&gradientFunction)
 
vtkSmartPointer< vtkColorTransferFunction > CreateColorTransferFunction ()
 
vtkSmartPointer< vtkPiecewiseFunction > CreateOpacityTransferFunction ()
 
vtkSmartPointer< vtkPiecewiseFunction > CreateGradientTransferFunction ()
 
virtual void SetType (const LookupTableType type)
 Set the look-up table type by enum (or integer). More...
 
virtual void SetType (const std::string &typeName)
 Set the look-up table type by string. More...
 
virtual const std::string GetActiveTypeAsString ()
 Return the current look-up table type as a string. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::LookupTable
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 

Protected Member Functions

 LabeledImageLookupTable ()
 
 LabeledImageLookupTable (const LabeledImageLookupTable &other)
 
virtual ~LabeledImageLookupTable ()
 
virtual void GenerateRandomColor (double &r, double &g, double &b)
 
virtual double GenerateRandomNumber ()
 
- Protected Member Functions inherited from mitk::LookupTable
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 LookupTable (const LookupTable &other)
 
virtual void BuildGrayScaleLookupTable ()
 
virtual void BuildLegacyBinaryLookupTable ()
 
virtual void BuildLegacyRainbowColorLookupTable ()
 
virtual void BuildInverseGrayScaleLookupTable ()
 
virtual void BuildHotIronLookupTable ()
 
virtual void BuildJetLookupTable (bool transparent=false)
 
virtual void BuildPETColorLookupTable ()
 
virtual void BuildPET20LookupTable ()
 
virtual void BuildMultiLabelLookupTable ()
 

Protected Attributes

mitk::LevelWindow m_LevelWindow
 
- Protected Attributes inherited from mitk::LookupTable
vtkSmartPointer< vtkLookupTable > m_LookupTable
 
float m_Window
 
float m_Level
 
float m_Opacity
 
LookupTableType m_type
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::LookupTable
static const char *const typenameList []
 

Detailed Description

A lookup table for 2D mapping of labeled images. The lookup table supports images with up to 256 unsigned labels. Negative labels are not supported. Please use the level/window settings as given by the GetLevelWindow() method to make sure, that the colors are rendered correctly. The colors are initialized with random colors as default. As background the label 0 is assumed. The color for the background is set to fully transparent as default.

Definition at line 37 of file mitkLabeledImageLookupTable.h.

Member Typedef Documentation

The data type for a label. Currently only images with labels in the range [0,255] are supported.

Definition at line 54 of file mitkLabeledImageLookupTable.h.

Constructor & Destructor Documentation

mitk::LabeledImageLookupTable::LabeledImageLookupTable ( )
protected
mitk::LabeledImageLookupTable::LabeledImageLookupTable ( const LabeledImageLookupTable other)
protected

Definition at line 58 of file mitkLabeledImageLookupTable.cpp.

mitk::LabeledImageLookupTable::~LabeledImageLookupTable ( )
protectedvirtual

Virtual destructor

Definition at line 66 of file mitkLabeledImageLookupTable.cpp.

Member Function Documentation

Pointer mitk::LabeledImageLookupTable::Clone ( ) const
void mitk::LabeledImageLookupTable::GenerateRandomColor ( double &  r,
double &  g,
double &  b 
)
protectedvirtual

Generates a random rgb color value. Values for rgb are in the range [0,1]

Definition at line 122 of file mitkLabeledImageLookupTable.cpp.

Referenced by LabeledImageLookupTable().

double mitk::LabeledImageLookupTable::GenerateRandomNumber ( )
protectedvirtual

Generates a radnom number drawn from a uniform distribution in the range [0,1].

Definition at line 133 of file mitkLabeledImageLookupTable.cpp.

double * mitk::LabeledImageLookupTable::GetColorForLabel ( const LabelType label)
virtual

Determines the color which will be used for coloring a given label.

Parameters
labelthe label for which the color should be returned
Returns
an rgba array containing the color information for the given label. Color components are expressed as [0,1] double values.

Determines the color which will be used for coloring a given label.

Parameters
labelthe label for which the color should be returned
Returns
an rgba array containing the color information for the given label Color components are expressed as [0,1] double values.

Definition at line 108 of file mitkLabeledImageLookupTable.cpp.

mitk::LevelWindow mitk::LabeledImageLookupTable::GetLevelWindow ( )
inline

Provides access to level window settings, which should be used in combination with the LUTs generated by this filter (at lease for 2D visualization. If you use other level/window settings, it is not guaranteed, that scalar values are mapped to the correct colors.

Definition at line 83 of file mitkLabeledImageLookupTable.h.

mitk::LabeledImageLookupTable::mitkClassMacro ( LabeledImageLookupTable  ,
LookupTable   
)

Standard mitk typedefs are generated by the mitkClassMacro

static Pointer mitk::LabeledImageLookupTable::New ( )
static

Make this object constructable by the New() Method.

mitk::LabeledImageLookupTable & mitk::LabeledImageLookupTable::operator= ( const LookupTable LookupTable)
overridevirtual

implementation necessary because operator made private in itk::Object

assignment operator implementation

Reimplemented from mitk::LookupTable.

Definition at line 70 of file mitkLabeledImageLookupTable.cpp.

References mitk::LookupTable::operator=().

void mitk::LabeledImageLookupTable::SetColorForLabel ( const LabelType label,
const double &  r,
const double &  g,
const double &  b,
const double  a = 1.0 
)
virtual

Sets the color for a given label

Parameters
labelThe pixel value used as a label in the image
rThe red component of the rgba color value. Values sould be given in the range [0,1]
gThe green component of the rgba color value. Values sould be given in the range [0,1]
bThe blue component of the rgba color value. Values sould be given in the range [0,1]
aThe alpha component of the rgba color value. Values sould be given in the range [0,1]. Default is 1.

Definition at line 88 of file mitkLabeledImageLookupTable.cpp.

Member Data Documentation

mitk::LevelWindow mitk::LabeledImageLookupTable::m_LevelWindow
protected

Definition at line 108 of file mitkLabeledImageLookupTable.h.

Referenced by LabeledImageLookupTable().


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