Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
The LookupTable class mitk wrapper for a vtkLookupTableThis class can be used to color images with a LookupTable, such as the 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 } |
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 | |
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... | |
virtual LookupTable & | operator= (const LookupTable &LookupTable) |
implementation necessary because operator made private in itk::Object 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 const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Attributes | |
static std::vector< std::string > | typenameList |
Protected Member Functions | |
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 | |
vtkSmartPointer< vtkLookupTable > | m_LookupTable |
float | m_Window |
float | m_Level |
float | m_Opacity |
LookupTableType | m_Type |
The LookupTable class mitk wrapper for a vtkLookupTable
This class can be used to color images with a LookupTable, such as the vtkLookupTable.
Definition at line 42 of file mitkLookupTable.h.
typedef itk::SmartPointer<const Self> mitk::LookupTable::ConstPointer |
Definition at line 50 of file mitkLookupTable.h.
Definition at line 50 of file mitkLookupTable.h.
typedef unsigned char mitk::LookupTable::RawLookupTableType |
RawLookupTableType raw lookuptable typedef for convenience.
Definition at line 48 of file mitkLookupTable.h.
typedef LookupTable mitk::LookupTable::Self |
Definition at line 50 of file mitkLookupTable.h.
typedef itk::DataObject mitk::LookupTable::Superclass |
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 |
Definition at line 198 of file mitkLookupTable.h.
mitk::LookupTable::LookupTable | ( | ) |
Definition at line 47 of file mitkLookupTable.cpp.
References BuildGrayScaleLookupTable().
|
override |
Definition at line 68 of file mitkLookupTable.cpp.
|
protected |
Definition at line 57 of file mitkLookupTable.cpp.
References m_LookupTable.
|
protectedvirtual |
Definition at line 414 of file mitkLookupTable.cpp.
References m_LookupTable.
Referenced by LookupTable(), and SetType().
|
protectedvirtual |
Definition at line 455 of file mitkLookupTable.cpp.
References HotIron, and m_LookupTable.
Referenced by SetType().
|
protectedvirtual |
Definition at line 601 of file mitkLookupTable.cpp.
References Inferno, and m_LookupTable.
Referenced by SetType().
|
protectedvirtual |
Definition at line 441 of file mitkLookupTable.cpp.
References m_LookupTable.
Referenced by SetType().
|
protectedvirtual |
Definition at line 471 of file mitkLookupTable.cpp.
References Jet, and m_LookupTable.
Referenced by SetType().
|
protectedvirtual |
Definition at line 427 of file mitkLookupTable.cpp.
References m_LookupTable.
Referenced by SetType().
|
protectedvirtual |
Definition at line 573 of file mitkLookupTable.cpp.
References m_LookupTable.
Referenced by SetType().
|
protectedvirtual |
Definition at line 633 of file mitkLookupTable.cpp.
References m_LookupTable, and Magma.
Referenced by SetType().
|
protectedvirtual |
Definition at line 527 of file mitkLookupTable.cpp.
References m_LookupTable, and Multilabel.
Referenced by SetType().
|
protectedvirtual |
Definition at line 511 of file mitkLookupTable.cpp.
References m_Level, m_LookupTable, m_Window, and PET20.
Referenced by SetType().
|
protectedvirtual |
Definition at line 494 of file mitkLookupTable.cpp.
References m_Level, m_LookupTable, m_Window, and PETColor.
Referenced by SetType().
|
protectedvirtual |
Definition at line 585 of file mitkLookupTable.cpp.
References m_LookupTable, and Plasma.
Referenced by SetType().
|
protectedvirtual |
Definition at line 617 of file mitkLookupTable.cpp.
References m_LookupTable, and Viridis.
Referenced by SetType().
|
virtual |
ChangeOpacity Set the opacity for a specific table index.
index | The lookuptable index. |
opacity | Opacity between 0.0 and 1.0. |
Definition at line 182 of file mitkLookupTable.cpp.
References m_LookupTable, and MITK_INFO.
|
virtual |
ChangeOpacityForAll Set the opacity for all table values.
opacity | Opacity between 0.0 and 1.0. |
Definition at line 166 of file mitkLookupTable.cpp.
References m_LookupTable.
Pointer mitk::LookupTable::Clone | ( | ) | const |
void mitk::LookupTable::CreateColorTransferFunction | ( | vtkColorTransferFunction *& | colorFunction | ) |
Definition at line 340 of file mitkLookupTable.cpp.
References CreateColorTransferFunction().
vtkSmartPointer< vtkColorTransferFunction > mitk::LookupTable::CreateColorTransferFunction | ( | ) |
Definition at line 312 of file mitkLookupTable.cpp.
References GetRawLookupTable(), and m_LookupTable.
Referenced by CreateColorTransferFunction().
void mitk::LookupTable::CreateGradientTransferFunction | ( | vtkPiecewiseFunction *& | gradientFunction | ) |
Definition at line 396 of file mitkLookupTable.cpp.
References CreateGradientTransferFunction().
vtkSmartPointer< vtkPiecewiseFunction > mitk::LookupTable::CreateGradientTransferFunction | ( | ) |
Definition at line 373 of file mitkLookupTable.cpp.
References GetRawLookupTable(), and m_LookupTable.
Referenced by CreateGradientTransferFunction().
void mitk::LookupTable::CreateOpacityTransferFunction | ( | vtkPiecewiseFunction *& | opacityFunction | ) |
Definition at line 368 of file mitkLookupTable.cpp.
References CreateOpacityTransferFunction().
vtkSmartPointer< vtkPiecewiseFunction > mitk::LookupTable::CreateOpacityTransferFunction | ( | ) |
Definition at line 345 of file mitkLookupTable.cpp.
References GetRawLookupTable(), and m_LookupTable.
Referenced by CreateOpacityTransferFunction().
|
virtual |
Return the current look-up table type.
Definition at line 151 of file mitkLookupTable.cpp.
References m_Type.
|
virtual |
Return the current look-up table type as a string.
Definition at line 156 of file mitkLookupTable.cpp.
References m_Type, and typenameList.
|
inlinevirtual |
Definition at line 50 of file mitkLookupTable.h.
|
virtual |
|
virtual |
GetColor convenience method wrapping the vtkLookupTable::GetColor() method.
Map one value through the lookup table and return the color as an RGB array of doubles between 0 and 1.
value | The value you want to map. |
rgb | RGB values between 0 and 1. |
Definition at line 201 of file mitkLookupTable.cpp.
References GetVtkLookupTable().
|
virtual |
GetRawLookupTable Getter for the raw lookuptable array.
Definition at line 221 of file mitkLookupTable.cpp.
References m_LookupTable.
Referenced by CreateColorTransferFunction(), CreateGradientTransferFunction(), and CreateOpacityTransferFunction().
|
inlinestatic |
Definition at line 50 of file mitkLookupTable.h.
|
virtual |
GetTableValue convenience method wrapping the vtkLookupTable::GetTableValue() method.
index | The index you want to get. |
rgba | RGB values between 0 and 1. |
Definition at line 206 of file mitkLookupTable.cpp.
References GetVtkLookupTable().
|
virtual |
GetVtkLookupTable Getter for the internally wrapped vtkLookupTable.
Definition at line 216 of file mitkLookupTable.cpp.
References m_LookupTable.
Referenced by GetColor(), GetTableValue(), operator=(), operator==(), and SetTableValue().
|
static |
Referenced by mitk::Tool::CreateSegmentationNode(), mitk::LookupTablePropertySerializer::Deserialize(), mitk::ColorBarAnnotation::GetLookupTable(), QmitkDataNodeColorMapAction::InitializeAction(), mitk::LabelSet::LabelSet(), mitk::RegEvaluationMapper2D::LocalStorage::LocalStorage(), mitk::ImageVtkMapper2D::LocalStorage::LocalStorage(), mitk::DoseImageVtkMapper2D::LocalStorage::LocalStorage(), mitk::LookupTableProperty::LookupTableProperty(), mitk::LookupTableSource::MakeOutput(), mitkImageVtkMapper2DLookupTableTest(), mitkPropertySerializationTest(), mitk::OtsuTool3D::RunSegmentation(), mitk::GizmoMapper2D::SetDefaultProperties(), mitk::RegEvaluationMapper2D::SetDefaultProperties(), mitk::ImageVtkMapper2D::SetDefaultProperties(), mitk::DoseImageVtkMapper2D::SetDefaultProperties(), and mitk::ColorBarAnnotation::SetLookupTable().
|
virtual |
non equality operator implementation
Definition at line 262 of file mitkLookupTable.cpp.
|
virtual |
implementation necessary because operator made private in itk::Object
Reimplemented in mitk::LabeledImageLookupTable.
Definition at line 267 of file mitkLookupTable.cpp.
References GetVtkLookupTable(), and m_LookupTable.
Referenced by mitk::LabeledImageLookupTable::operator=().
|
virtual |
equality operator implementation
Definition at line 226 of file mitkLookupTable.cpp.
References GetVtkLookupTable(), and m_LookupTable.
|
overrideprotected |
Definition at line 401 of file mitkLookupTable.cpp.
References m_LookupTable.
|
override |
Checks, if the requested region lies outside of the buffered region by calling verifyRequestedRegion().
Definition at line 292 of file mitkLookupTable.cpp.
|
virtual |
|
virtual |
|
override |
This method has no effect for lookup tables, since we do not support the region-mechanism.
Definition at line 306 of file mitkLookupTable.cpp.
|
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.
Definition at line 288 of file mitkLookupTable.cpp.
|
virtual |
SetTableValue convenience method wrapping the vtkLookupTable::SetTableValue() method.
index | The index you want to set. |
rgba | RGB values between 0 and 1. |
Definition at line 211 of file mitkLookupTable.cpp.
References GetVtkLookupTable().
Referenced by mitk::GizmoInteractor::SetManipulatedObjectNode().
|
virtual |
Set the look-up table type by enum (or integer).
Returns if the given type doesn't exist. Only changes the type if it is different from the current one.
Definition at line 83 of file mitkLookupTable.cpp.
References BuildGrayScaleLookupTable(), BuildHotIronLookupTable(), BuildInfernoLookupTable(), BuildInverseGrayScaleLookupTable(), BuildJetLookupTable(), BuildLegacyBinaryLookupTable(), BuildLegacyRainbowColorLookupTable(), BuildMagmaLookupTable(), BuildMultiLabelLookupTable(), BuildPET20LookupTable(), BuildPETColorLookupTable(), BuildPlasmaLookupTable(), BuildViridisLookupTable(), GRAYSCALE, HOT_IRON, INFERNO, INVERSE_GRAYSCALE, JET, JET_TRANSPARENT, LEGACY_BINARY, LEGACY_RAINBOW_COLOR, m_Type, MAGMA, MITK_ERROR, MULTILABEL, PET_20, PET_COLOR, PLASMA, and VIRIDIS.
Referenced by SetType().
|
virtual |
Set the look-up table type by string.
Returns if the given type doesn't exist. Only changes the type if it is different from the current one.
Definition at line 140 of file mitkLookupTable.cpp.
References SetType(), and typenameList.
|
virtual |
SetVtkLookupTable Setter for the internal lookuptable.
lut | The lookuptable. |
Definition at line 72 of file mitkLookupTable.cpp.
References m_LookupTable.
|
virtual |
|
override |
Updates the output information of the current object by calling updateOutputInformation of the data objects source object.
Definition at line 280 of file mitkLookupTable.cpp.
|
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.
Definition at line 297 of file mitkLookupTable.cpp.
|
protected |
Definition at line 264 of file mitkLookupTable.h.
Referenced by BuildPET20LookupTable(), and BuildPETColorLookupTable().
|
protected |
Definition at line 261 of file mitkLookupTable.h.
Referenced by BuildGrayScaleLookupTable(), BuildHotIronLookupTable(), BuildInfernoLookupTable(), BuildInverseGrayScaleLookupTable(), BuildJetLookupTable(), BuildLegacyBinaryLookupTable(), BuildLegacyRainbowColorLookupTable(), BuildMagmaLookupTable(), BuildMultiLabelLookupTable(), BuildPET20LookupTable(), BuildPETColorLookupTable(), BuildPlasmaLookupTable(), BuildViridisLookupTable(), ChangeOpacity(), ChangeOpacityForAll(), CreateColorTransferFunction(), CreateGradientTransferFunction(), CreateOpacityTransferFunction(), mitk::LabeledImageLookupTable::GetColorForLabel(), GetRawLookupTable(), GetVtkLookupTable(), mitk::LabeledImageLookupTable::LabeledImageLookupTable(), LookupTable(), operator=(), operator==(), PrintSelf(), mitk::LabeledImageLookupTable::SetColorForLabel(), and SetVtkLookupTable().
|
protected |
Definition at line 265 of file mitkLookupTable.h.
|
protected |
Definition at line 267 of file mitkLookupTable.h.
Referenced by GetActiveType(), GetActiveTypeAsString(), and SetType().
|
protected |
Definition at line 263 of file mitkLookupTable.h.
Referenced by BuildPET20LookupTable(), and BuildPETColorLookupTable().
|
static |
Definition at line 216 of file mitkLookupTable.h.
Referenced by GetActiveTypeAsString(), and SetType().