13 #ifndef mitkMultiLabelSegmentationVtkMapper3D_h
14 #define mitkMultiLabelSegmentationVtkMapper3D_h
27 #include <vtkSmartPointer.h>
35 class vtkPolyDataMapper;
36 class vtkPolyDataNormals;
37 class vtkSurfaceNets3D;
41 class MultiLabelSegmentationGroupMapping;
91 std::map<const Image*, std::unique_ptr<MultiLabelSegmentationGroupMapping>>
m_GroupPipelines;
#define MITKMULTILABEL_EXPORT
Organizes the rendering process.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Interface to application preferences.
Base class for mapper-specific rendering resources.
Per-renderer cache of VTK actors and the surface-extraction state.
itk::TimeStamp m_LastPropertyUpdateTime
Timestamp of last update of a property.
vtkSmartPointer< vtkLookupTable > m_VtkLookupTable
Lookup table keyed by integer label value, shared by all per-group mappers.
std::map< const Image *, std::unique_ptr< MultiLabelSegmentationGroupMapping > > m_GroupPipelines
Map from group images to their respective rendering pipelines.
bool m_UseFadedPipeline
Indicates whether label highlighting is active.
mitk::TimeStepType m_LastUpdateTimeStep
The last time step that was updated.
LocalStorage()
Default constructor of the local storage.
bool m_LastSmoothed
Smoothing state with which the cached polydata was last extracted.
bool m_3DRenderingPreference
Whether 3D rendering is preferred.
IPreferences * m_SegPreferences
Pointer to the segmentation preferences.
~LocalStorage() override
Default destructor of the local storage.
itk::TimeStamp m_LastDataUpdateTime
Timestamp of last update of stored data.
std::vector< vtkIdType > m_PopulatedLabelEntries
Label values whose LUT entries were populated during the previous update.
mitk::LookupTable::Pointer m_LabelLookupTable
Look up table for label colors (cloned from the segmentation).
float m_LastOpacityFactor
The "opacity factor" preference value baked into the current LUT.
vtkSmartPointer< vtkPropAssembly > m_Actors
Assembly of all VTK actors used for rendering (one actor per group).
3D mapper for mitk::MultiLabelSegmentation.
void Update(mitk::BaseRenderer *renderer) override
Checks whether this mapper needs to update itself and generate data.
~MultiLabelSegmentationVtkMapper3D() override
Default destructor.
MultiLabelSegmentationVtkMapper3D()
Default constructor.
static bool ResolveSmoothed(const mitk::DataNode *node, mitk::BaseRenderer *renderer)
Resolve the active surface-smoothing state for a node.
void UpdateLookupTable(LocalStorage *localStorage)
Generates the look up table that should be used.
void UpdateSurfaceMapping(LocalStorage *localStorage, const OutdatedGroupVectorType &outdatedData)
Update the surface mapping for the given outdated groups.
mitkClassMacro(MultiLabelSegmentationVtkMapper3D, VtkMapper)
vtkProp * GetVtkProp(mitk::BaseRenderer *renderer) override
Get the VTK prop for MITK-VTK rendering pipeline.
OutdatedGroupVectorType CheckForOutdatedGroups(mitk::MultiLabelSegmentationVtkMapper3D::LocalStorage *ls, mitk::MultiLabelSegmentation *seg, bool fadedPipelineChanged)
Check if groups are outdated or obsolete.
LocalStorage * GetLocalStorage(mitk::BaseRenderer *renderer)
Get the LocalStorage corresponding to the current renderer.
static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
Set the default properties for multilabel segmentation rendering.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override
Drives surface re-extraction and lookup-table refresh for all outdated groups.
std::vector< std::pair< mitk::MultiLabelSegmentation::GroupIndexType, const mitk::Image * > > OutdatedGroupVectorType
Type for a vector of outdated group indices paired with their images.
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
Base class of all VTK-based Mappers for displaying primitives using VTK functionality.
Find image slices visible on a given plane.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).