Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage Class Reference

Per-renderer cache of VTK actors and the surface-extraction state. More...

#include <mitkMultiLabelSegmentationVtkMapper3D.h>

Inheritance diagram for mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage:
Collaboration diagram for mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage:

Public Member Functions

 LocalStorage ()
 Default constructor of the local storage. More...
 
 ~LocalStorage () override
 Default destructor of the local storage. More...
 
- Public Member Functions inherited from mitk::Mapper::BaseLocalStorage
 BaseLocalStorage ()=default
 
virtual ~BaseLocalStorage ()=default
 
 BaseLocalStorage (const BaseLocalStorage &)=delete
 
BaseLocalStorage & operator= (const BaseLocalStorage &)=delete
 
bool IsGenerateDataRequired (mitk::BaseRenderer *renderer, mitk::Mapper *mapper, mitk::DataNode *dataNode) const
 Check whether GenerateDataForRenderer() needs to be called. More...
 
void UpdateGenerateDataTime ()
 Mark the stored data as up-to-date. More...
 
itk::TimeStamp & GetLastGenerateDataTime ()
 Get a reference to the last-generate-data timestamp. More...
 

Public Attributes

vtkSmartPointer< vtkPropAssembly > m_Actors
 Assembly of all VTK actors used for rendering (one actor per group). More...
 
std::map< const Image *, std::unique_ptr< MultiLabelSegmentationGroupMapping > > m_GroupPipelines
 Map from group images to their respective rendering pipelines. More...
 
vtkSmartPointer< vtkLookupTable > m_VtkLookupTable
 Lookup table keyed by integer label value, shared by all per-group mappers. More...
 
bool m_UseFadedPipeline
 Indicates whether label highlighting is active. More...
 
itk::TimeStamp m_LastDataUpdateTime
 Timestamp of last update of stored data. More...
 
itk::TimeStamp m_LastPropertyUpdateTime
 Timestamp of last update of a property. More...
 
mitk::TimeStepType m_LastUpdateTimeStep
 The last time step that was updated. More...
 
mitk::LookupTable::Pointer m_LabelLookupTable
 Look up table for label colors (cloned from the segmentation). More...
 
std::vector< vtkIdType > m_PopulatedLabelEntries
 Label values whose LUT entries were populated during the previous update. More...
 
bool m_3DRenderingPreference
 Whether 3D rendering is preferred. More...
 
bool m_LastSmoothed
 Smoothing state with which the cached polydata was last extracted. More...
 
IPreferences * m_SegPreferences
 Pointer to the segmentation preferences. More...
 
float m_LastOpacityFactor
 The "opacity factor" preference value baked into the current LUT. More...
 

Additional Inherited Members

- Protected Attributes inherited from mitk::Mapper::BaseLocalStorage
itk::TimeStamp m_LastGenerateDataTime
 Timestamp of last update of stored data. More...
 

Detailed Description

Per-renderer cache of VTK actors and the surface-extraction state.

Definition at line 84 of file mitkMultiLabelSegmentationVtkMapper3D.h.

Constructor & Destructor Documentation

◆ LocalStorage()

mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::LocalStorage ( )

Default constructor of the local storage.

◆ ~LocalStorage()

mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::~LocalStorage ( )
override

Default destructor of the local storage.

Member Data Documentation

◆ m_3DRenderingPreference

bool mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_3DRenderingPreference

Whether 3D rendering is preferred.

Definition at line 127 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_Actors

vtkSmartPointer<vtkPropAssembly> mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_Actors

Assembly of all VTK actors used for rendering (one actor per group).

Definition at line 88 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_GroupPipelines

std::map<const Image*, std::unique_ptr<MultiLabelSegmentationGroupMapping> > mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_GroupPipelines

Map from group images to their respective rendering pipelines.

Definition at line 91 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_LabelLookupTable

mitk::LookupTable::Pointer mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_LabelLookupTable

Look up table for label colors (cloned from the segmentation).

Definition at line 117 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_LastDataUpdateTime

itk::TimeStamp mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_LastDataUpdateTime

Timestamp of last update of stored data.

Definition at line 109 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_LastOpacityFactor

float mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_LastOpacityFactor

The "opacity factor" preference value baked into the current LUT.

The factor is a global preference, not a node property, so it carries no MTime. Caching the applied value lets Update()/GenerateDataForRenderer detect a change and rebuild the LUT, mirroring m_LastSmoothed / m_3DRenderingPreference.

Definition at line 149 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_LastPropertyUpdateTime

itk::TimeStamp mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_LastPropertyUpdateTime

Timestamp of last update of a property.

Definition at line 111 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_LastSmoothed

bool mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_LastSmoothed

Smoothing state with which the cached polydata was last extracted.

Tracks the cached extraction state, not the user's currently requested state. Written only after a successful re-extraction inside GenerateDataForRenderer. Comparing ResolveSmoothed(...) against this value detects when the cached surfaces no longer match the requested smoothing and forces a re-extraction; preserving it across early-return paths in Update() (hidden node, 3D rendering disabled, uninitialised segmentation) keeps that staleness check correct.

Definition at line 138 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_LastUpdateTimeStep

mitk::TimeStepType mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_LastUpdateTimeStep

The last time step that was updated.

Definition at line 114 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_PopulatedLabelEntries

std::vector<vtkIdType> mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_PopulatedLabelEntries

Label values whose LUT entries were populated during the previous update.

Used to clear only those entries on the next refresh instead of zeroing the full MAX_LABEL_VALUE+1 range every time.

Definition at line 124 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_SegPreferences

IPreferences* mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_SegPreferences

Pointer to the segmentation preferences.

Definition at line 141 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_UseFadedPipeline

bool mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_UseFadedPipeline

Indicates whether label highlighting is active.

Kept as a flag so CheckForOutdatedGroups can detect highlight-mode toggles, even though there is no longer a separate faded actor.

Definition at line 106 of file mitkMultiLabelSegmentationVtkMapper3D.h.

◆ m_VtkLookupTable

vtkSmartPointer<vtkLookupTable> mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage::m_VtkLookupTable

Lookup table keyed by integer label value, shared by all per-group mappers.

Replaces the previous color/opacity transfer-function trio. Highlighting is encoded here directly via the alpha channel: highlighted labels are forced opaque and non-highlighted labels are faded.

Definition at line 99 of file mitkMultiLabelSegmentationVtkMapper3D.h.


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