Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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
22 class vtkAlgorithm;
23 class vtkAlgorithmOutput;
24 class vtkAssignAttribute;
25 class vtkThreshold;
26 class vtkPassThrough;
27 class vtkPointSet;
28 class vtkPolyData;
29 class vtkUnstructuredGrid;
30 
35 class VTK_MRML_EXPORT vtkMRMLModelDisplayNode : public vtkMRMLDisplayNode
36 {
37 public:
38  static vtkMRMLModelDisplayNode *New();
40  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
41 
43  {
47  SliceDisplayMode_Last // placeholder after the last valid value, this must be the last in the list of modes
48  };
49 
52  virtual void ReadXMLAttributes(const char** atts) VTK_OVERRIDE;
53 
56  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
57 
60  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
61 
62  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
63 
65  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "ModelDisplay";}
66 
70  virtual void SetInputMeshConnection(vtkAlgorithmOutput* meshConnection);
71  virtual void SetInputPolyDataConnection(vtkAlgorithmOutput* polyDataConnection);
72 
76  virtual vtkAlgorithmOutput* GetInputMeshConnection();
77  virtual vtkAlgorithmOutput* GetInputPolyDataConnection();
78 
81  virtual vtkPointSet* GetInputMesh();
82  virtual vtkPolyData* GetInputPolyData();
83  virtual vtkUnstructuredGrid* GetInputUnstructuredGrid();
84 
92  virtual vtkPointSet* GetOutputMesh();
93  virtual vtkPolyData* GetOutputPolyData();
94  virtual vtkUnstructuredGrid* GetOutputUnstructuredGrid();
95 
99  virtual vtkAlgorithmOutput* GetOutputMeshConnection();
100  virtual vtkAlgorithmOutput* GetOutputPolyDataConnection();
101 
108  virtual void SetActiveScalarName(const char *scalarName) VTK_OVERRIDE;
109 
112  virtual void SetActiveAttributeLocation(int location) VTK_OVERRIDE;
113 
116  virtual void SetScalarRangeFlag(int flag) VTK_OVERRIDE;
117 
120  vtkSetMacro(ThresholdEnabled,bool);
121  vtkBooleanMacro(ThresholdEnabled,bool);
122 
126  vtkGetMacro(ThresholdEnabled,bool);
127 
130  void SetThresholdRange(double min, double max);
131  void SetThresholdRange(double range[2]);
132 
135  void GetThresholdRange(double range[2]);
136  double GetThresholdMin();
137  double GetThresholdMax();
138 
142  vtkGetMacro(SliceDisplayMode, int);
143  vtkSetMacro(SliceDisplayMode, int);
144  void SetSliceDisplayModeToIntersection();
145  void SetSliceDisplayModeToProjection();
146  void SetSliceDisplayModeToDistanceEncodedProjection();
147 
149  static const char* GetSliceDisplayModeAsString(int id);
150  static int GetSliceDisplayModeFromString(const char* name);
151 
156  virtual void SetAndObserveDistanceEncodedProjectionColorNodeID(const char *colorNodeID);
159  virtual const char* GetDistanceEncodedProjectionColorNodeID();
160  virtual vtkMRMLColorNode* GetDistanceEncodedProjectionColorNode();
161 
162 protected:
166  void operator=(const vtkMRMLModelDisplayNode&);
167 
168  virtual void ProcessMRMLEvents(vtkObject *caller,
169  unsigned long event,
170  void *callData) VTK_OVERRIDE;
171 
173  virtual void SetInputToMeshPipeline(vtkAlgorithmOutput* meshConnection);
174 
177  virtual void UpdateAssignedAttribute();
178 
180  virtual vtkDataArray* GetActiveScalarArray();
181 
183  virtual void UpdateScalarRange();
184 
189  vtkAssignAttribute* AssignAttribute;
190 
194  vtkPassThrough* PassThrough;
195 
200  vtkThreshold* ThresholdFilter;
201 
207 
209 };
210 
211 #endif
vtkAssignAttribute * AssignAttribute
Show full model projected on the slice, colored by distance from slice plane.
virtual void SetScalarRangeFlag(int)
virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE
Copy the node's attributes to this object.
MRML node to represent a display property of 3D surface model.
Show full model projected on the slice (similar to MIP view of images)
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
virtual void SetActiveScalarName(const char *)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
Show model in slice view as intersection with slice.
void operator=(const vtkMRMLDisplayNode &)
Abstract MRML node to represent color information.
virtual void SetActiveAttributeLocation(int)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void WriteXML(ostream &of, int indent) VTK_OVERRIDE
Abstract class that contains graphical display properties for displayable nodes.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE