Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLSegmentationsDisplayableManager2D.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21#ifndef __vtkMRMLSegmentationsDisplayableManager2D_h
22#define __vtkMRMLSegmentationsDisplayableManager2D_h
23
24// MRMLDisplayableManager includes
26
27#include "vtkSlicerSegmentationsModuleMRMLDisplayableManagerExport.h"
28
30class vtkStringArray;
31class vtkDoubleArray;
32
37class VTK_SLICER_SEGMENTATIONS_MODULE_MRMLDISPLAYABLEMANAGER_EXPORT vtkMRMLSegmentationsDisplayableManager2D
39{
40
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
48 std::string GetDataProbeInfoStringForPosition(double xyz[3]) override;
49
52 virtual void GetVisibleSegmentsForPosition(double ras[3], vtkMRMLSegmentationDisplayNode* displayNode,
53 vtkStringArray* segmentIDs, vtkDoubleArray* segmentValues = nullptr);
54
60 int AddCustomSegmentRenderer(const std::string& segmentationDisplayNodeID, const std::string& segmentID);
61
65
66 // Check if a custom segment renderer has been registered for a segment by AddCustomSegmentRenderer()
67 // \return The tag that can be used to remove the custom segment renderer. 0 is no custom renderer is set.
68 int GetCustomSegmentRendererTag(const std::string& segmentationDisplayNodeID, const std::string& segmentID);
69
70 // Check if a custom segment renderer has been registered for a segment by AddCustomSegmentRenderer()
71 // \return True if a custom renderer is set.
72 bool HasCustomSegmentRenderer(const std::string& segmentationDisplayNodeID, const std::string& segmentID);
73
74 // @{
79 std::string GetCustomSegmentRendererSegmentID(int index);
80 // @}
81
82protected:
83 void UnobserveMRMLScene() override;
84 void OnMRMLSceneNodeAdded(vtkMRMLNode* node) override;
85 void OnMRMLSceneNodeRemoved(vtkMRMLNode* node) override;
86 void ProcessMRMLNodesEvents(vtkObject* caller, unsigned long event, void* callData) override;
87
89 void UpdateFromMRML() override;
90
91 void OnMRMLSceneStartClose() override;
92 void OnMRMLSceneEndClose() override;
93
95
97 void Create() override;
98
99protected:
102
103private:
105 void operator=(const vtkMRMLSegmentationsDisplayableManager2D&) = delete;
106
107 class vtkInternal;
108 vtkInternal * Internal;
109 friend class vtkInternal;
110};
111
112#endif
Abstract Superclass for all specific types of MRML nodes.
MRML node for representing segmentation display attributes.
void UpdateFromMRML() override
Update Actors based on transforms in the scene.
std::string GetCustomSegmentRendererSegmentationDisplayNodeID(int index)
void OnMRMLSceneNodeAdded(vtkMRMLNode *node) override
std::string GetDataProbeInfoStringForPosition(double xyz[3]) override
void PrintSelf(ostream &os, vtkIndent indent) override
int GetCustomSegmentRendererTag(const std::string &segmentationDisplayNodeID, const std::string &segmentID)
static vtkMRMLSegmentationsDisplayableManager2D * New()
void OnMRMLSceneNodeRemoved(vtkMRMLNode *node) override
int GetNumberOfCustomSegmentsRenderers()
Get information on custom segment renderers. Intended for troubleshooting.
void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData) override
bool HasCustomSegmentRenderer(const std::string &segmentationDisplayNodeID, const std::string &segmentID)
int AddCustomSegmentRenderer(const std::string &segmentationDisplayNodeID, const std::string &segmentID)
void Create() override
Initialize the displayable manager based on its associated vtkMRMLSliceNode.
std::string GetCustomSegmentRendererSegmentID(int index)
virtual void GetVisibleSegmentsForPosition(double ras[3], vtkMRMLSegmentationDisplayNode *displayNode, vtkStringArray *segmentIDs, vtkDoubleArray *segmentValues=nullptr)