15 #ifndef __vtkMRMLHierarchyNode_h 16 #define __vtkMRMLHierarchyNode_h 33 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
39 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
43 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
51 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Hierarchy";}
59 virtual
void UpdateReferences() VTK_OVERRIDE;
63 virtual
void UpdateScene(
vtkMRMLScene *scene) VTK_OVERRIDE;
67 virtual
void UpdateReferenceID(const
char *oldID, const
char *newID) VTK_OVERRIDE;
79 virtual
char* GetParentNodeID()
81 return GetParentNodeIDReference();
84 virtual void SetParentNodeID(
const char* ref);
88 void GetAllChildrenNodes(std::vector< vtkMRMLHierarchyNode *> &childrenNodes);
94 std::vector< vtkMRMLHierarchyNode *> GetChildrenNodes();
99 return static_cast<int>(this->GetChildrenNodes().size());
106 int GetIndexInParent();
109 void SetIndexInParent(
int index);
113 void MoveInParent(
int increment);
116 void RemoveHierarchyChildrenNodes();
119 void RemoveAllHierarchyChildrenNodes();
124 ChildNodeAddedEvent = 15550,
125 ChildNodeRemovedEvent = 15551
134 return GetAssociatedNodeIDReference();
137 virtual void SetAssociatedNodeID(
const char* ref);
146 virtual void GetAssociatedChildrenNodes(vtkCollection *children,
const char* childClass=NULL);
151 const char *associatedNodeID);
157 void SetSortingValue(
double value);
158 vtkGetMacro(SortingValue,
double);
164 vtkGetMacro(AllowMultipleChildren,
int);
165 vtkSetMacro(AllowMultipleChildren,
int);
166 vtkBooleanMacro(AllowMultipleChildren,
int);
177 void SetParentNodeIDReference(
const char*
id);
178 vtkGetStringMacro(ParentNodeIDReference);
189 static void AssociatedHierarchyIsModified(
vtkMRMLScene *scene);
194 void SetAssociatedNodeIDReference(
const char*);
195 vtkGetStringMacro(AssociatedNodeIDReference);
206 static int UpdateAssociatedToHierarchyMap(
vtkMRMLScene *scene);
218 void UpdateChildrenMap();
228 void InvokeHierarchyModifiedEvent(
vtkMRMLNode *node = NULL);
static std::map< vtkMRMLScene *, vtkMTimeType > SceneHierarchyChildrenNodesMTime
std::map< std::string, std::vector< vtkMRMLHierarchyNode * > > HierarchyChildrenNodesType
static double MaximumSortingValue
static std::map< vtkMRMLScene *, vtkMTimeType > SceneAssociatedHierarchyNodesMTime
static std::map< vtkMRMLScene *, HierarchyChildrenNodesType > SceneHierarchyChildrenNodes
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
virtual char * GetAssociatedNodeID()
String ID of the corresponding displayable MRML node
Abstract class representing a hierarchy member.
virtual void SetSceneReferences()
Update the references of the node to the scene.
A set of MRML Nodes that supports serialization and undo/redo.
char * ParentNodeIDReference
int GetNumberOfChildrenNodes()
Returns the number of immediate children in the hierarchy.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
std::map< std::string, vtkMRMLHierarchyNode * > AssociatedHierarchyNodesType
static std::map< vtkMRMLScene *, AssociatedHierarchyNodesType > SceneAssociatedHierarchyNodes
int AllowMultipleChildren
is this a node that's only supposed to have one child?
Abstract Superclass for all specific types of MRML nodes.
char * AssociatedNodeIDReference
String ID of the associated MRML node