Slicer  4.10
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
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 vtkGeometryFilter;
26 class vtkThreshold;
27 class vtkPassThrough;
28 class vtkPointSet;
29 class vtkPolyData;
30 class vtkUnstructuredGrid;
31 
36 class VTK_MRML_EXPORT vtkMRMLModelDisplayNode : public vtkMRMLDisplayNode
37 {
38 public:
39  static vtkMRMLModelDisplayNode *New();
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44  {
48  SliceDisplayMode_Last // placeholder after the last valid value, this must be the last in the list of modes
49  };
50 
53  virtual void ReadXMLAttributes(const char** atts) VTK_OVERRIDE;
54 
57  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
58 
61  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
62 
63  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
64 
66  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "ModelDisplay";}
67 
71  virtual void SetInputMeshConnection(vtkAlgorithmOutput* meshConnection);
72  virtual void SetInputPolyDataConnection(vtkAlgorithmOutput* polyDataConnection);
73 
77  virtual vtkAlgorithmOutput* GetInputMeshConnection();
78  virtual vtkAlgorithmOutput* GetInputPolyDataConnection();
79 
82  virtual vtkPointSet* GetInputMesh();
83  virtual vtkPolyData* GetInputPolyData();
84  virtual vtkUnstructuredGrid* GetInputUnstructuredGrid();
85 
93  virtual vtkPointSet* GetOutputMesh();
94  virtual vtkPolyData* GetOutputPolyData();
95  virtual vtkUnstructuredGrid* GetOutputUnstructuredGrid();
96 
100  virtual vtkAlgorithmOutput* GetOutputMeshConnection();
101  virtual vtkAlgorithmOutput* GetOutputPolyDataConnection();
102 
109  virtual void SetActiveScalarName(const char *scalarName) VTK_OVERRIDE;
110 
113  virtual void SetActiveAttributeLocation(int location) VTK_OVERRIDE;
114 
119  virtual void SetActiveScalar(const char *scalarName, int location);
120 
123  virtual void SetScalarRangeFlag(int flag) VTK_OVERRIDE;
124 
127  void SetThresholdEnabled(bool enabled);
128  vtkBooleanMacro(ThresholdEnabled,bool);
129 
133  vtkGetMacro(ThresholdEnabled,bool);
134 
137  void SetThresholdRange(double min, double max);
138  void SetThresholdRange(double range[2]);
139 
142  void GetThresholdRange(double range[2]);
143  double* GetThresholdRange();
144  double GetThresholdMin();
145  double GetThresholdMax();
146 
150  vtkGetMacro(SliceDisplayMode, int);
151  vtkSetMacro(SliceDisplayMode, int);
152  void SetSliceDisplayModeToIntersection();
153  void SetSliceDisplayModeToProjection();
154  void SetSliceDisplayModeToDistanceEncodedProjection();
155 
157  static const char* GetSliceDisplayModeAsString(int id);
158  static int GetSliceDisplayModeFromString(const char* name);
159 
164  virtual void SetAndObserveDistanceEncodedProjectionColorNodeID(const char *colorNodeID);
167  virtual const char* GetDistanceEncodedProjectionColorNodeID();
168  virtual vtkMRMLColorNode* GetDistanceEncodedProjectionColorNode();
169 
171  virtual vtkDataArray* GetActiveScalarArray();
172 
173 protected:
177  void operator=(const vtkMRMLModelDisplayNode&);
178 
179  virtual void ProcessMRMLEvents(vtkObject *caller,
180  unsigned long event,
181  void *callData) VTK_OVERRIDE;
182 
184  virtual void SetInputToMeshPipeline(vtkAlgorithmOutput* meshConnection);
185 
188  virtual void UpdateAssignedAttribute();
189 
192  virtual void UpdateScalarRange();
193 
198  vtkAssignAttribute* AssignAttribute;
199 
203  vtkPassThrough* PassThrough;
204 
209  vtkThreshold* ThresholdFilter;
210 
214  vtkGeometryFilter* ConvertToPolyDataFilter;
215 
221 
223 
225  double ThresholdRangeTemp[2];
226 };
227 
228 #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.
vtkGeometryFilter * ConvertToPolyDataFilter
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:138
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE