|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
MITK wrapper for a vtkLookupTable. More...
#include <mitkLookupTable.h>


Public Types | |
| enum | LookupTableType { GRAYSCALE , INVERSE_GRAYSCALE , HOT_IRON , JET , JET_TRANSPARENT , PLASMA , INFERNO , VIRIDIS , MAGMA , LEGACY_BINARY , LEGACY_RAINBOW_COLOR , MULTILABEL , PET_COLOR , PET_20 , PET_BLACK_WHITE , TURBO } |
| The LookupTableType enum for different predefined lookup tables. More... | |
| typedef unsigned char | RawLookupTableType |
| Convenience typedef for the raw lookup table element type. More... | |
Public Member Functions | |
| mitkClassMacroItkParent (LookupTable, itk::DataObject) | |
| Pointer | Clone () const |
| virtual vtkSmartPointer< vtkLookupTable > | GetVtkLookupTable () const |
| Get the internally wrapped vtkLookupTable. More... | |
| virtual RawLookupTableType * | GetRawLookupTable () const |
| Get the raw lookup table array from the wrapped vtkLookupTable. More... | |
| virtual void | SetVtkLookupTable (vtkSmartPointer< vtkLookupTable > lut) |
| Set the internal vtkLookupTable. More... | |
| virtual void | ChangeOpacityForAll (float opacity) |
| Set the opacity (alpha) for all entries in the table. More... | |
| virtual void | ChangeOpacity (int index, float opacity) |
| Set the opacity (alpha) for a specific table entry. More... | |
| virtual void | GetColor (double value, double rgb[3]) |
| Map a scalar value to an RGB color via the lookup table. More... | |
| virtual void | GetTableValue (int index, double rgba[4]) |
| Get the RGBA tuple at a specific table index. More... | |
| virtual void | SetTableValue (int index, double rgba[4]) |
| Set the RGBA tuple at a specific table index. More... | |
| virtual void | SetWindow (float _arg) |
| virtual void | SetLevel (float _arg) |
| virtual void | SetOpacity (float _arg) |
| virtual bool | operator== (const mitk::LookupTable &LookupTable) const |
| Compare two LookupTable objects for equality. More... | |
| virtual bool | operator!= (const LookupTable &LookupTable) const |
| Compare two LookupTable objects for inequality. More... | |
| virtual LookupTable & | operator= (const LookupTable &LookupTable) |
| Copy assignment operator. More... | |
| void | UpdateOutputInformation () override |
| Update output information by querying the source object. More... | |
| void | SetRequestedRegionToLargestPossibleRegion () override |
| Set the requested region to the largest possible region. More... | |
| bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
| Check whether the requested region is outside the buffered region. More... | |
| bool | VerifyRequestedRegion () override |
| Check whether the requested region is valid. More... | |
| void | SetRequestedRegion (const itk::DataObject *data) override |
| Set the requested region from another data object. More... | |
| LookupTable () | |
| Default constructor. Builds a GRAYSCALE table by default. More... | |
| ~LookupTable () override | |
| Destructor. More... | |
| vtkSmartPointer< vtkColorTransferFunction > | CreateColorTransferFunction () |
| Create a vtkColorTransferFunction from this lookup table. More... | |
| vtkSmartPointer< vtkPiecewiseFunction > | CreateOpacityTransferFunction () |
| Create a vtkPiecewiseFunction for opacity from this lookup table. More... | |
| vtkSmartPointer< vtkPiecewiseFunction > | CreateGradientTransferFunction () |
| Create a vtkPiecewiseFunction for gradient opacity from this lookup table. More... | |
| virtual void | SetType (const LookupTableType type) |
| Set the lookup table type by enum value. More... | |
| virtual void | SetType (const std::string &typeName) |
| Set the lookup table type by name string. More... | |
| virtual LookupTableType | GetActiveType () const |
| Get the currently active lookup table type. More... | |
| virtual std::string | GetActiveTypeAsString () const |
| Get the currently active lookup table type as a string. More... | |
Static Public Member Functions | |
| static Pointer | New () |
| static int | GetMultiLabelColorCount () |
| Number of curated colors in the MULTILABEL palette. More... | |
| static void | GetMultiLabelColor (int index, double rgb[3]) |
| RGB of the index-th MULTILABEL color, in [0,1]. More... | |
Static Public Attributes | |
| static std::vector< std::string > | typenameList |
| List of all predefined lookup table type names. More... | |
Protected Member Functions | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
| LookupTable (const Self &other) | |
| mitkCloneMacro (Self) | |
| 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 | BuildPETBWLookupTable () |
| virtual void | BuildMultiLabelLookupTable () |
| virtual void | BuildTurboLookupTable () |
Protected Attributes | |
| vtkSmartPointer< vtkLookupTable > | m_LookupTable |
| float | m_Window |
| float | m_Level |
| float | m_Opacity |
| LookupTableType | m_Type |
MITK wrapper for a vtkLookupTable.
Wraps a vtkLookupTable and provides convenience methods for creating predefined color lookup tables (grayscale, hot iron, jet, PET, etc.), modifying opacity values, and querying color mappings.
Definition at line 44 of file mitkLookupTable.h.
| typedef unsigned char mitk::LookupTable::RawLookupTableType |
Convenience typedef for the raw lookup table element type.
Definition at line 50 of file mitkLookupTable.h.
The LookupTableType enum for different predefined lookup tables.
The different LookupTableTypes can be applied in the MitkWorkbench via right-clicking on an image and choosing a color map.
| Enumerator | |
|---|---|
| GRAYSCALE | |
| INVERSE_GRAYSCALE | |
| HOT_IRON | |
| JET | |
| JET_TRANSPARENT | |
| PLASMA | |
| INFERNO | |
| VIRIDIS | |
| MAGMA | |
| LEGACY_BINARY | |
| LEGACY_RAINBOW_COLOR | |
| MULTILABEL | |
| PET_COLOR | |
| PET_20 | |
| PET_BLACK_WHITE | |
| TURBO | |
Definition at line 248 of file mitkLookupTable.h.
| mitk::LookupTable::LookupTable | ( | ) |
Default constructor. Builds a GRAYSCALE table by default.
|
override |
Destructor.
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Set the opacity (alpha) for a specific table entry.
| [in] | index | Zero-based index into the lookup table. |
| [in] | opacity | Opacity value between 0.0 (transparent) and 1.0 (opaque). |
|
virtual |
Set the opacity (alpha) for all entries in the table.
| [in] | opacity | Opacity value between 0.0 (transparent) and 1.0 (opaque). |
| Pointer mitk::LookupTable::Clone | ( | ) | const |
| vtkSmartPointer<vtkColorTransferFunction> mitk::LookupTable::CreateColorTransferFunction | ( | ) |
Create a vtkColorTransferFunction from this lookup table.
| vtkSmartPointer<vtkPiecewiseFunction> mitk::LookupTable::CreateGradientTransferFunction | ( | ) |
Create a vtkPiecewiseFunction for gradient opacity from this lookup table.
| vtkSmartPointer<vtkPiecewiseFunction> mitk::LookupTable::CreateOpacityTransferFunction | ( | ) |
Create a vtkPiecewiseFunction for opacity from this lookup table.
|
virtual |
Get the currently active lookup table type.
|
virtual |
Get the currently active lookup table type as a string.
|
virtual |
Map a scalar value to an RGB color via the lookup table.
Wraps vtkLookupTable::GetColor().
| [in] | value | The scalar value to map. |
| [out] | rgb | Array of 3 doubles filled with RGB values in [0, 1]. |
|
static |
RGB of the index-th MULTILABEL color, in [0,1].
Indices 0..GetMultiLabelColorCount()-1 are the curated palette; higher indices are algorithmically generated. The MULTILABEL lookup table and the label-color selection both draw their colors from here, so callers do not have to round-trip through the table.
| mitk::Exception | if index is negative. |
|
static |
Number of curated colors in the MULTILABEL palette.
They occupy lookup-table slots 1..N (slot 0 is the transparent background); higher slots hold algorithmically generated colors. Derived from the color table, so callers never hardcode the count.
|
virtual |
Get the raw lookup table array from the wrapped vtkLookupTable.
|
virtual |
Get the RGBA tuple at a specific table index.
Wraps vtkLookupTable::GetTableValue().
| [in] | index | Zero-based index into the table. |
| [out] | rgba | Array of 4 doubles filled with RGBA values in [0, 1]. |
|
virtual |
Get the internally wrapped vtkLookupTable.
| mitk::LookupTable::mitkClassMacroItkParent | ( | LookupTable | , |
| itk::DataObject | |||
| ) |
|
protected |
|
static |
|
virtual |
Compare two LookupTable objects for inequality.
| [in] | LookupTable | The LookupTable to compare against. |
|
virtual |
Copy assignment operator.
Necessary because itk::Object makes operator= private.
| [in] | LookupTable | The LookupTable to copy from. |
Reimplemented in mitk::LabeledImageLookupTable.
|
virtual |
Compare two LookupTable objects for equality.
| [in] | LookupTable | The LookupTable to compare against. |
|
overrideprotected |
|
override |
Check whether the requested region is outside the buffered region.
|
virtual |
|
virtual |
|
override |
Set the requested region from another data object.
No-op for lookup tables since the region mechanism is not supported.
| [in] | data | The data object whose region would be copied (ignored). |
|
override |
Set the requested region to the largest possible region.
No-op for lookup tables since the requested-region mechanism is not supported.
|
virtual |
Set the RGBA tuple at a specific table index.
Wraps vtkLookupTable::SetTableValue().
| [in] | index | Zero-based index into the table. |
| [in] | rgba | Array of 4 doubles with RGBA values in [0, 1]. |
|
virtual |
Set the lookup table type by enum value.
Rebuilds the internal vtkLookupTable for the given type. Does nothing if the type is already active or if the type is not recognized.
| [in] | type | The desired LookupTableType enum value. |
|
virtual |
Set the lookup table type by name string.
Looks up typeName in typenameList and delegates to SetType(LookupTableType). Does nothing if the name is not found.
| [in] | typeName | Case-sensitive name of the lookup table type. |
|
virtual |
Set the internal vtkLookupTable.
| [in] | lut | The vtkLookupTable to wrap. |
|
virtual |
|
override |
Update output information by querying the source object.
|
override |
Check whether the requested region is valid.
Always returns true because lookup tables are always processed as a whole.
|
protected |
Definition at line 329 of file mitkLookupTable.h.
|
protected |
Definition at line 326 of file mitkLookupTable.h.
|
protected |
Definition at line 330 of file mitkLookupTable.h.
|
protected |
Definition at line 332 of file mitkLookupTable.h.
|
protected |
Definition at line 328 of file mitkLookupTable.h.
|
static |
List of all predefined lookup table type names.
Definition at line 269 of file mitkLookupTable.h.