Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLDisplayableHierarchyNode.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: vtkMRMLDisplayableHierarchyNode.h,v $
10  Date: $Date: 2006/03/19 17:12:28 $
11  Version: $Revision: 1.6 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLDisplayableHierarchyNode_h
16 #define __vtkMRMLDisplayableHierarchyNode_h
17 
18 #include "vtkMRMLHierarchyNode.h"
20 class vtkMRMLDisplayNode;
21 
22 class vtkCallbackCommand;
23 
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
31 
32  //--------------------------------------------------------------------------
34  //--------------------------------------------------------------------------
35 
36  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
37 
40  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
41 
44  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
45 
46 
49  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
50 
53  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "DisplayableHierarchy";}
54 
56  virtual void SetSceneReferences() VTK_OVERRIDE;
57 
61  virtual void UpdateReferences() VTK_OVERRIDE;
62 
65  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
66 
69  virtual void UpdateReferenceID(const char *oldID, const char *newID) VTK_OVERRIDE;
70 
73  virtual char* GetDisplayableNodeID()
74  {
75  return this->GetAssociatedNodeID();
76  }
77 
78  virtual void SetDisplayableNodeID(const char* ref)
79  {
80  this->SetAssociatedNodeID(ref);
81  }
82 
83  void SetAndObserveDisplayNodeID(const char *DisplayNodeID);
84  vtkGetStringMacro(DisplayNodeID);
85 
86 
89  vtkMRMLDisplayableNode* GetDisplayableNode();
90 
93  vtkMRMLDisplayNode* GetDisplayNode();
94 
95 
98  vtkBooleanMacro(Expanded, int);
99  vtkGetMacro(Expanded, int);
100  vtkSetMacro(Expanded, int);
101 
104  vtkMRMLDisplayableHierarchyNode* GetCollapsedParentNode();
105 
108  void GetChildrenDisplayableNodes(vtkCollection *children);
109 
112  static vtkMRMLDisplayableHierarchyNode* GetDisplayableHierarchyNode(vtkMRMLScene *scene,
113  const char *displayableNodeID);
114 
115 
118  void RemoveChildrenNodes();
119 
122  void RemoveAllChildrenNodes();
123 
124 
127  virtual void ProcessMRMLEvents ( vtkObject * /*caller*/,
128  unsigned long /*event*/,
129  void * /*callData*/ ) VTK_OVERRIDE;
130 
132  enum
133  {
134  DisplayModifiedEvent = 17000
135  };
136 
137 
138 protected:
143 
144  void SetDisplayNodeID(const char *);
145 
147 
149 
150  int Expanded;
151 
152 
153 };
154 
155 #endif
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
Create instance of the default node. Like New only virtual.
virtual void SetAssociatedNodeID(const char *ref)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void SetSceneReferences() VTK_OVERRIDE
Set the reference node to current scene.
virtual char * GetAssociatedNodeID()
String ID of the corresponding displayable MRML node
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData)
Propagate events generated in mrml.
Abstract class representing a hierarchy member.
void operator=(const vtkMRMLHierarchyNode &)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
virtual void SetDisplayableNodeID(const char *ref)
static vtkMRMLHierarchyNode * New()
Abstract class that contains graphical display properties for displayable nodes.
MRML node to represent a hierarchy of displayable nodes.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138