Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkLabeledImageLookupTable.h>
Public Types | |
typedef unsigned char | LabelType |
![]() | |
enum | LookupTableType { GRAYSCALE, INVERSE_GRAYSCALE, HOT_IRON, JET, JET_TRANSPARENT, PLASMA, INFERNO, VIRIDIS, MAGMA, 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< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
mitkClassMacro (LabeledImageLookupTable, LookupTable) | |
Pointer | Clone () const |
LabeledImageLookupTable & | operator= (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 () |
![]() | |
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 RawLookupTableType * | GetRawLookupTable () 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... | |
void | UpdateOutputInformation () override |
Updates the output information of the current object by calling updateOutputInformation of the data objects source object. More... | |
void | SetRequestedRegionToLargestPossibleRegion () override |
Sets the requested Region to the largest possible region. This method is not implemented, since this is the default behavior of the itk pipeline and we do not support the requested-region mechanism for lookup-tables. More... | |
bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
Checks, if the requested region lies outside of the buffered region by calling verifyRequestedRegion(). More... | |
bool | VerifyRequestedRegion () override |
Checks if the requested region is completely contained in the buffered region. Since we always want to process the lookup table as a whole, this method always returns true. More... | |
void | SetRequestedRegion (const itk::DataObject *data) override |
This method has no effect for lookup tables, since we do not support the region-mechanism. More... | |
LookupTable () | |
~LookupTable () override | |
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 LookupTableType | GetActiveType () const |
Return the current look-up table type. More... | |
virtual std::string | GetActiveTypeAsString () const |
Return the current look-up table type as a string. More... | |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Protected Member Functions | |
LabeledImageLookupTable () | |
LabeledImageLookupTable (const LabeledImageLookupTable &other) | |
~LabeledImageLookupTable () override | |
virtual void | GenerateRandomColor (double &r, double &g, double &b) |
virtual double | GenerateRandomNumber () |
![]() | |
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 | BuildPlasmaLookupTable () |
virtual void | BuildInfernoLookupTable () |
virtual void | BuildViridisLookupTable () |
virtual void | BuildMagmaLookupTable () |
virtual void | BuildJetLookupTable (bool transparent=false) |
virtual void | BuildPETColorLookupTable () |
virtual void | BuildPET20LookupTable () |
virtual void | BuildMultiLabelLookupTable () |
Protected Attributes | |
mitk::LevelWindow | m_LevelWindow |
![]() | |
vtkSmartPointer< vtkLookupTable > | m_LookupTable |
float | m_Window |
float | m_Level |
float | m_Opacity |
LookupTableType | m_Type |
Additional Inherited Members | |
![]() | |
static std::vector< std::string > | typenameList |
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 33 of file mitkLabeledImageLookupTable.h.
typedef unsigned char mitk::LabeledImageLookupTable::LabelType |
The data type for a label. Currently only images with labels in the range [0,255] are supported.
Definition at line 45 of file mitkLabeledImageLookupTable.h.
|
protected |
Default constructor. Protected to prevent "normal" creation
Definition at line 20 of file mitkLabeledImageLookupTable.cpp.
References GenerateRandomColor(), m_LevelWindow, mitk::LookupTable::m_LookupTable, mitk::LevelWindow::SetFixed(), mitk::LevelWindow::SetRangeMinMax(), and mitk::LevelWindow::SetWindowBounds().
|
protected |
Definition at line 54 of file mitkLabeledImageLookupTable.cpp.
|
overrideprotected |
Virtual destructor
Definition at line 62 of file mitkLabeledImageLookupTable.cpp.
Pointer mitk::LabeledImageLookupTable::Clone | ( | ) | const |
|
protectedvirtual |
Generates a random rgb color value. Values for rgb are in the range [0,1]
Definition at line 118 of file mitkLabeledImageLookupTable.cpp.
References GenerateRandomNumber().
Referenced by LabeledImageLookupTable().
|
protectedvirtual |
Generates a radnom number drawn from a uniform distribution in the range [0,1].
Definition at line 129 of file mitkLabeledImageLookupTable.cpp.
Referenced by GenerateRandomColor().
|
virtual |
Determines the color which will be used for coloring a given label.
label | the label for which the color should be returned |
Determines the color which will be used for coloring a given label.
label | the label for which the color should be returned |
Definition at line 104 of file mitkLabeledImageLookupTable.cpp.
References mitk::LookupTable::m_LookupTable.
|
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 80 of file mitkLabeledImageLookupTable.h.
mitk::LabeledImageLookupTable::mitkClassMacro | ( | LabeledImageLookupTable | , |
LookupTable | |||
) |
Standard mitk typedefs are generated by the mitkClassMacro
|
static |
Make this object constructable by the ::New() Method.
|
overridevirtual |
implementation necessary because operator made private in itk::Object
Reimplemented from mitk::LookupTable.
Definition at line 66 of file mitkLabeledImageLookupTable.cpp.
References m_LevelWindow, and mitk::LookupTable::operator=().
|
virtual |
Sets the color for a given label
label | The pixel value used as a label in the image |
r | The red component of the rgba color value. Values sould be given in the range [0,1] |
g | The green component of the rgba color value. Values sould be given in the range [0,1] |
b | The blue component of the rgba color value. Values sould be given in the range [0,1] |
a | The alpha component of the rgba color value. Values sould be given in the range [0,1]. Default is 1. |
Definition at line 84 of file mitkLabeledImageLookupTable.cpp.
References mitk::LookupTable::m_LookupTable.
|
protected |
Definition at line 105 of file mitkLabeledImageLookupTable.h.
Referenced by LabeledImageLookupTable(), and operator=().