Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLModelDisplayNode.h
Go to the documentation of this file.
1/*=auto=========================================================================
2
3 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Program: 3D Slicer
9 Module: $RCSfile: vtkMRMLModelDisplayNode.h,v $
10 Date: $Date: 2006/03/19 17:12:28 $
11 Version: $Revision: 1.6 $
12
13=========================================================================auto=*/
14
15#ifndef __vtkMRMLModelDisplayNode_h
16#define __vtkMRMLModelDisplayNode_h
17
18// MRML includes
19#include "vtkMRMLDisplayNode.h"
20
21// VTK includes
22class vtkAlgorithm;
23class vtkAlgorithmOutput;
24class vtkAssignAttribute;
25class vtkGeometryFilter;
26class vtkThreshold;
27class vtkPassThrough;
28class vtkPointSet;
29class vtkPolyData;
30class vtkStaticCleanUnstructuredGrid;
31class vtkUnstructuredGrid;
32
37class VTK_MRML_EXPORT vtkMRMLModelDisplayNode : public vtkMRMLDisplayNode
38{
39public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45 {
49 SliceDisplayMode_Last // placeholder after the last valid value, this must be the last in the list of modes
50 };
51
54 void ReadXMLAttributes(const char** atts) override;
55
58 void WriteXML(ostream& of, int indent) override;
59
63
65
67 const char* GetNodeTagName() override { return "ModelDisplay"; }
68
72 virtual void SetInputMeshConnection(vtkAlgorithmOutput* meshConnection);
73 virtual void SetInputPolyDataConnection(vtkAlgorithmOutput* polyDataConnection);
74
78 virtual vtkAlgorithmOutput* GetInputMeshConnection();
79 virtual vtkAlgorithmOutput* GetInputPolyDataConnection();
80
83 virtual vtkPointSet* GetInputMesh();
84 virtual vtkPolyData* GetInputPolyData();
85 virtual vtkUnstructuredGrid* GetInputUnstructuredGrid();
86
94 virtual vtkPointSet* GetOutputMesh();
95 virtual vtkPolyData* GetOutputPolyData();
96 virtual vtkUnstructuredGrid* GetOutputUnstructuredGrid();
97
101 virtual vtkAlgorithmOutput* GetOutputMeshConnection();
102 virtual vtkAlgorithmOutput* GetOutputPolyDataConnection();
103
110 void SetActiveScalarName(const char* scalarName) override;
111
114 void SetActiveAttributeLocation(int location) override;
115
118 void SetThresholdEnabled(bool enabled);
119 vtkBooleanMacro(ThresholdEnabled, bool);
120
124 vtkGetMacro(ThresholdEnabled, bool);
125
128 void SetThresholdRange(double min, double max);
129 void SetThresholdRange(double range[2]);
130
133 void GetThresholdRange(double range[2]);
134 double* GetThresholdRange() VTK_SIZEHINT(2);
137
146 void SetMergeCoincidentPoints(bool merge);
147 vtkGetMacro(MergeCoincidentPoints, bool);
148 vtkBooleanMacro(MergeCoincidentPoints, bool);
149
153 vtkGetMacro(SliceDisplayMode, int);
154 vtkSetMacro(SliceDisplayMode, int);
158
160 static const char* GetSliceDisplayModeAsString(int id);
161 static int GetSliceDisplayModeFromString(const char* name);
162
167 virtual void SetAndObserveDistanceEncodedProjectionColorNodeID(const char* colorNodeID);
172
175 virtual vtkDataSet* GetScalarDataSet() override;
177 virtual vtkDataArray* GetActiveScalarArray() override;
178
181 vtkSetVector3Macro(BackfaceColorHSVOffset, double);
182 vtkGetVector3Macro(BackfaceColorHSVOffset, double);
183
184 vtkSetMacro(ClippingCapSurface, bool);
185 vtkGetMacro(ClippingCapSurface, bool);
186 vtkBooleanMacro(ClippingCapSurface, bool);
187
188 vtkSetMacro(ClippingOutline, bool);
189 vtkGetMacro(ClippingOutline, bool);
190 vtkBooleanMacro(ClippingOutline, bool);
191
192 vtkSetMacro(ClippingCapOpacity, double);
193 vtkGetMacro(ClippingCapOpacity, double);
194
195 vtkSetVector3Macro(ClippingCapColorHSVOffset, double);
196 vtkGetVector3Macro(ClippingCapColorHSVOffset, double);
197
198protected:
202 void operator=(const vtkMRMLModelDisplayNode&);
203
204 void ProcessMRMLEvents(vtkObject* caller, unsigned long event, void* callData) override;
205
207 virtual void SetInputToMeshPipeline(vtkAlgorithmOutput* meshConnection);
208
211 virtual void UpdateAssignedAttribute() override;
212
216
221 vtkAssignAttribute* AssignAttribute;
222
226 vtkPassThrough* PassThrough;
227
232 vtkThreshold* ThresholdFilter;
233
237 vtkGeometryFilter* ConvertToPolyDataFilter;
238
241 vtkStaticCleanUnstructuredGrid* MergeCoincidentPointsFilter;
242
248
250
252
255
257
258 bool ClippingCapSurface{ false };
259 double ClippingCapOpacity{ 1.0 };
260 bool ClippingOutline{ false };
262};
263
264#endif
Abstract MRML node to represent color information.
virtual void SetInputMeshConnection(vtkAlgorithmOutput *meshConnection)
virtual void UpdateAssignedAttribute() override
virtual vtkPolyData * GetOutputPolyData()
virtual vtkUnstructuredGrid * GetOutputUnstructuredGrid()
void SetThresholdEnabled(bool enabled)
void SetSliceDisplayModeToDistanceEncodedProjection()
void SetSliceDisplayModeToProjection()
virtual vtkAlgorithmOutput * GetInputMeshConnection()
vtkMRMLCopyContentMacro(vtkMRMLModelDisplayNode)
virtual vtkAlgorithmOutput * GetOutputMeshConnection()
virtual vtkDataArray * GetActiveScalarArray() override
Return the current active scalar array (based on active scalar name and location)
@ SliceDisplayDistanceEncodedProjection
Show full model projected on the slice, colored by distance from slice plane.
@ SliceDisplayProjection
Show full model projected on the slice (similar to MIP view of images)
@ SliceDisplayIntersection
Show model in slice view as intersection with slice.
void SetThresholdRange(double range[2])
vtkStaticCleanUnstructuredGrid * MergeCoincidentPointsFilter
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
virtual void SetAndObserveDistanceEncodedProjectionColorNodeID(const char *colorNodeID)
void SetActiveAttributeLocation(int location) override
virtual vtkMRMLColorNode * GetDistanceEncodedProjectionColorNode()
void SetSliceDisplayModeToIntersection()
virtual vtkAlgorithmOutput * GetInputPolyDataConnection()
void SetThresholdRange(double min, double max)
virtual vtkPointSet * GetInputMesh()
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
virtual void SetInputPolyDataConnection(vtkAlgorithmOutput *polyDataConnection)
virtual const char * GetDistanceEncodedProjectionColorNodeID()
void PrintSelf(ostream &os, vtkIndent indent) override
vtkAssignAttribute * AssignAttribute
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
static int GetSliceDisplayModeFromString(const char *name)
void SetActiveScalarName(const char *scalarName) override
vtkGeometryFilter * ConvertToPolyDataFilter
virtual vtkDataSet * GetScalarDataSet() override
void GetThresholdRange(double range[2])
static vtkMRMLModelDisplayNode * New()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
double * GetThresholdRange() VTK_SIZEHINT(2)
virtual vtkPolyData * GetInputPolyData()
void SetMergeCoincidentPoints(bool merge)
virtual vtkUnstructuredGrid * GetInputUnstructuredGrid()
static const char * GetSliceDisplayModeAsString(int id)
Convert between slice display mode ID and name.
virtual vtkPointSet * GetOutputMesh()
virtual void SetInputToMeshPipeline(vtkAlgorithmOutput *meshConnection)
To be reimplemented in subclasses if the input of the pipeline changes.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
double ThresholdRangeTemp[2]
Temporary variable to allow GetThresholdRange() method to return threshold range as a pointer.
virtual vtkAlgorithmOutput * GetOutputPolyDataConnection()