Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::GenericLookupTable< T > Class Template Reference

Template class for generating lookup-tables. More...

#include <mitkGenericLookupTable.h>

Inheritance diagram for mitk::GenericLookupTable< T >:
Collaboration diagram for mitk::GenericLookupTable< T >:

Public Types

typedef unsigned int IdentifierType
 
typedef T ValueType
 
typedef std::map< IdentifierType, ValueType > LookupTableType
 
typedef GenericLookupTable Self
 

Public Member Functions

 GenericLookupTable ()
 Default constructor. More...
 
 GenericLookupTable (const GenericLookupTable &)=default
 Copy constructor. More...
 
virtual ~GenericLookupTable ()
 Virtual destructor. More...
 
virtual const char * GetNameOfClass () const
 Return the class name as a string. More...
 
void SetTableValue (IdentifierType id, ValueType value)
 Set the value for the given identifier. More...
 
bool ValueExists (IdentifierType id) const
 Check if a value exists for the given identifier. More...
 
ValueType GetTableValue (IdentifierType id) const
 Get the value for the given identifier. More...
 
const LookupTableType & GetLookupTable () const
 Get the underlying lookup table map. More...
 
bool operator== (const Self &lookupTable) const
 Equality comparison operator. More...
 
bool operator!= (const Self &lookupTable) const
 Inequality comparison operator. More...
 
virtual Self & operator= (const Self &other)
 Assignment operator. More...
 

Protected Attributes

LookupTableType m_LookupTable
 

Detailed Description

template<typename T>
class mitk::GenericLookupTable< T >

Template class for generating lookup-tables.

This class template can be instantiated for all classes/internal types that fulfill these requirements:

  • an operator<< so that the property value can be put into a std::stringstream
  • an operator== so that two properties can be checked for equality

The main purpose of this class is to be used in conjunction with GenericLookupTableProperty. This enables passing of arbitrary lookup tables to mappers to configure the rendering process.

Definition at line 46 of file mitkGenericLookupTable.h.

Member Typedef Documentation

◆ IdentifierType

template<typename T >
typedef unsigned int mitk::GenericLookupTable< T >::IdentifierType

Definition at line 49 of file mitkGenericLookupTable.h.

◆ LookupTableType

template<typename T >
typedef std::map<IdentifierType, ValueType> mitk::GenericLookupTable< T >::LookupTableType

Definition at line 51 of file mitkGenericLookupTable.h.

◆ Self

template<typename T >
typedef GenericLookupTable mitk::GenericLookupTable< T >::Self

Definition at line 53 of file mitkGenericLookupTable.h.

◆ ValueType

template<typename T >
typedef T mitk::GenericLookupTable< T >::ValueType

Definition at line 50 of file mitkGenericLookupTable.h.

Constructor & Destructor Documentation

◆ GenericLookupTable() [1/2]

template<typename T >
mitk::GenericLookupTable< T >::GenericLookupTable ( )
inline

Default constructor.

Definition at line 56 of file mitkGenericLookupTable.h.

◆ GenericLookupTable() [2/2]

template<typename T >
mitk::GenericLookupTable< T >::GenericLookupTable ( const GenericLookupTable< T > &  )
default

Copy constructor.

◆ ~GenericLookupTable()

template<typename T >
virtual mitk::GenericLookupTable< T >::~GenericLookupTable ( )
inlinevirtual

Virtual destructor.

Definition at line 62 of file mitkGenericLookupTable.h.

Member Function Documentation

◆ GetLookupTable()

template<typename T >
const LookupTableType& mitk::GenericLookupTable< T >::GetLookupTable ( ) const
inline

Get the underlying lookup table map.

Returns
Const reference to the map.

Definition at line 100 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

Referenced by mitk::to_json().

◆ GetNameOfClass()

template<typename T >
virtual const char* mitk::GenericLookupTable< T >::GetNameOfClass ( ) const
inlinevirtual

Return the class name as a string.

Reimplemented in mitk::DICOMCachedValueLookupTable.

Definition at line 65 of file mitkGenericLookupTable.h.

◆ GetTableValue()

template<typename T >
ValueType mitk::GenericLookupTable< T >::GetTableValue ( IdentifierType  id) const
inline

Get the value for the given identifier.

Parameters
idThe identifier to look up.
Returns
The value associated with the identifier.
Exceptions
std::range_errorif the identifier does not exist.

Definition at line 88 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

◆ operator!=()

template<typename T >
bool mitk::GenericLookupTable< T >::operator!= ( const Self &  lookupTable) const
inline

Inequality comparison operator.

Definition at line 106 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

◆ operator=()

template<typename T >
virtual Self& mitk::GenericLookupTable< T >::operator= ( const Self &  other)
inlinevirtual

Assignment operator.

Definition at line 109 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

◆ operator==()

template<typename T >
bool mitk::GenericLookupTable< T >::operator== ( const Self &  lookupTable) const
inline

Equality comparison operator.

Definition at line 103 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

◆ SetTableValue()

template<typename T >
void mitk::GenericLookupTable< T >::SetTableValue ( IdentifierType  id,
ValueType  value 
)
inline

Set the value for the given identifier.

Parameters
idThe identifier (key) in the lookup table.
valueThe value to associate with the identifier.

Definition at line 71 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

◆ ValueExists()

template<typename T >
bool mitk::GenericLookupTable< T >::ValueExists ( IdentifierType  id) const
inline

Check if a value exists for the given identifier.

Parameters
idThe identifier to look up.
Returns
True if the identifier exists in the table.

Definition at line 77 of file mitkGenericLookupTable.h.

References mitk::GenericLookupTable< T >::m_LookupTable.

Member Data Documentation

◆ m_LookupTable


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