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
vtkMRMLDisplayableNode.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: vtkMRMLDisplayableNode.h,v $
10  Date: $Date: 2006/03/19 17:12:28 $
11  Version: $Revision: 1.6 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLDisplayableNode_h
16 #define __vtkMRMLDisplayableNode_h
17 
18 // MRML includes
20 class vtkMRMLDisplayNode;
21 
22 // STD includes
23 #include <vector>
24 
40 
41 class vtkMRMLDisplayNode;
42 
43 class VTK_MRML_EXPORT vtkMRMLDisplayableNode : public vtkMRMLTransformableNode
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
48 
49  //--------------------------------------------------------------------------
51  //--------------------------------------------------------------------------
52 
53  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE = 0;
54 
55  virtual const char* GetNodeTagName() VTK_OVERRIDE = 0;
56 
59  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
60 
63  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
64 
70  virtual void WriteCLI(std::vector<std::string>& vtkNotUsed(commandLine),
71  std::string vtkNotUsed(prefix),
72  int vtkNotUsed(coordinateSystemFlag) = 0,
73  int vtkNotUsed(multipleFlag) = 1) {};
74 
77  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
78 
82  void SetAndObserveDisplayNodeID(const char *displayNodeID);
83 
87  void AddAndObserveDisplayNodeID(const char *displayNodeID);
88 
92  void RemoveNthDisplayNodeID(int n);
93 
96  void RemoveAllDisplayNodeIDs();
97 
112  void SetAndObserveNthDisplayNodeID(int n, const char *displayNodeID);
113 
116  bool HasDisplayNodeID(const char* displayNodeID);
117 
121  int GetNumberOfDisplayNodes();
122 
128  const char *GetNthDisplayNodeID(int n);
129 
133  const char *GetDisplayNodeID();
134 
145  vtkMRMLDisplayNode* GetNthDisplayNode(int n);
146 
150  vtkMRMLDisplayNode* GetDisplayNode();
151 
158 
161  virtual void ProcessMRMLEvents ( vtkObject * /*caller*/,
162  unsigned long /*event*/,
163  void * /*callData*/ ) VTK_OVERRIDE;
164 
173  enum
174  {
175  DisplayModifiedEvent = 17000,
176  };
177 
181  virtual void CreateDefaultDisplayNodes();
182 
188  virtual int GetDisplayVisibility();
189  virtual void SetDisplayVisibility(int visible);
190 
193  virtual int GetDisplayClassVisibility(const char* nodeClass);
194  virtual void SetDisplayClassVisibility(const char* nodeClass, int visible);
195 
200  virtual void GetRASBounds(double bounds[6]);
201 
205  virtual void GetBounds(double bounds[6]);
206 
207  virtual const char* GetDisplayNodeReferenceRole();
208 
212  virtual void SetSelectable(int) VTK_OVERRIDE;
213 
214  protected:
218  void operator=(const vtkMRMLDisplayableNode&);
219 
220  static const char* DisplayNodeReferenceRole;
222 
223  virtual const char* GetDisplayNodeReferenceMRMLAttributeName();
224 
227  virtual void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) VTK_OVERRIDE;
228 
231  virtual void OnNodeReferenceModified(vtkMRMLNodeReference *reference) VTK_OVERRIDE;
232 
235  virtual void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference) VTK_OVERRIDE;
236 
237  private:
238 
241  std::vector<vtkMRMLDisplayNode *> DisplayNodes;
242 };
243 
244 #endif
LRU Cache.
virtual void OnNodeReferenceModified(vtkMRMLNodeReference *reference) VTK_OVERRIDE
Called when a node reference ID is modified.
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Transform nodes
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void operator=(const vtkMRMLTransformableNode &)
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.
static const char * DisplayNodeReferenceMRMLAttributeName
virtual void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference) VTK_OVERRIDE
Called after a node reference ID is removed (list size decreased).
static const char * DisplayNodeReferenceRole
Abstract class that contains graphical display properties for displayable nodes.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
Class to hold information about a node reference.
Definition: vtkMRMLNode.h:741
virtual void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) VTK_OVERRIDE
Called when a node reference ID is added (list size increased).
virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE
Copy the node&#39;s attributes to this object
virtual void SetSelectable(int)
MRML node for representing a node with a transform.