Slicer  5.0
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
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) override;
31 
32  //--------------------------------------------------------------------------
34  //--------------------------------------------------------------------------
35 
36  vtkMRMLNode* CreateNodeInstance() override;
37 
40  void ReadXMLAttributes( const char** atts) override;
41 
44  void WriteXML(ostream& of, int indent) override;
45 
46 
49  void Copy(vtkMRMLNode *node) override;
50 
53  const char* GetNodeTagName() override {return "DisplayableHierarchy";}
54 
56  void SetSceneReferences() override;
57 
61  void UpdateReferences() override;
62 
65  void UpdateScene(vtkMRMLScene *scene) override;
66 
69  void UpdateReferenceID(const char *oldID, const char *newID) 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  void ProcessMRMLEvents ( vtkObject * /*caller*/,
128  unsigned long /*event*/,
129  void * /*callData*/ ) 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
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
const char * GetNodeTagName() override
Get node XML tag name (like Volume, DisplayableHierarchy)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void UpdateReferenceID(const char *oldID, const char *newID) override
Update the stored reference to another node in the scene
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void SetAssociatedNodeID(const char *ref)
virtual char * GetDisplayableNodeID()
String ID of the corresponding displayable MRML node
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
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 &)
void SetSceneReferences() override
Set the reference node to current scene.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
virtual void SetDisplayableNodeID(const char *ref)
void UpdateReferences() override
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:167
void UpdateScene(vtkMRMLScene *scene) override
Observe the reference transform node