Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
19#include "vtkMRMLStorageNode.h"
22
23// STD includes
24#include <vector>
25
41
43
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
50 //--------------------------------------------------------------------------
52 //--------------------------------------------------------------------------
53
55
56 const char* GetNodeTagName() override = 0;
57
60 void ReadXMLAttributes(const char** atts) override;
61
64 void WriteXML(ostream& of, int indent) override;
65
71 virtual void WriteCLI(std::vector<std::string>& vtkNotUsed(commandLine),
72 std::string vtkNotUsed(prefix),
73 int vtkNotUsed(coordinateSystemFlag) = vtkMRMLStorageNode::CoordinateSystemRAS,
74 int vtkNotUsed(multipleFlag) = 1) {};
75
78 void Copy(vtkMRMLNode* node) override;
79
83 void SetAndObserveDisplayNodeID(const char* displayNodeID);
84
88 void AddAndObserveDisplayNodeID(const char* displayNodeID);
89
94
98
113 void SetAndObserveNthDisplayNodeID(int n, const char* displayNodeID);
114
117 bool HasDisplayNodeID(const char* displayNodeID);
118
123
129 const char* GetNthDisplayNodeID(int n);
130
134 const char* GetDisplayNodeID();
135
147
152
159
162 void ProcessMRMLEvents(vtkObject* /*caller*/, unsigned long /*event*/, void* /*callData*/) override;
163
172 enum
173 {
175 };
176
181
186
191 virtual int GetDisplayVisibility();
192 virtual void SetDisplayVisibility(int visible);
193
197 virtual int GetDisplayClassVisibility(const char* nodeClass);
198 virtual void SetDisplayClassVisibility(const char* nodeClass, int visible);
199
204 virtual void GetRASBounds(double bounds[6]);
205
209 virtual void GetBounds(double bounds[6]);
210
211 virtual const char* GetDisplayNodeReferenceRole();
212
216 void SetSelectable(int) override;
217
218protected:
223
224 static const char* DisplayNodeReferenceRole;
226
228
232
236
240
241private:
244 std::vector<vtkMRMLDisplayNode*> DisplayNodes;
245};
246
247#endif
Abstract class that contains graphical display properties for displayable nodes.
void SetSelectable(int) override
virtual void SetDisplayClassVisibility(const char *nodeClass, int visible)
const char * GetDisplayNodeID()
virtual void GetBounds(double bounds[6])
virtual int GetDisplayVisibility()
virtual void WriteCLI(std::vector< std::string > &vtkNotUsed(commandLine), std::string vtkNotUsed(prefix), int vtkNotUsed(coordinateSystemFlag)=vtkMRMLStorageNode::CoordinateSystemRAS, int vtkNotUsed(multipleFlag)=1)
virtual void CreateDefaultSequenceDisplayNodes()
bool HasDisplayNodeID(const char *displayNodeID)
Return true if displayNodeID is in the display node ID list.
~vtkMRMLDisplayableNode() override
vtkMRMLDisplayNode * GetNthDisplayNode(int n)
virtual int GetDisplayClassVisibility(const char *nodeClass)
const char * GetNthDisplayNodeID(int n)
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
void AddAndObserveDisplayNodeID(const char *displayNodeID)
void RemoveNthDisplayNodeID(int n)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void PrintSelf(ostream &os, vtkIndent indent) override
void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) override
Called when a node reference ID is added (list size increased).
virtual void SetDisplayVisibility(int visible)
virtual void GetRASBounds(double bounds[6])
void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference) override
Called after a node reference ID is removed (list size decreased).
vtkMRMLNode * CreateNodeInstance() override=0
MRMLNode methods.
void SetAndObserveDisplayNodeID(const char *displayNodeID)
void RemoveAllDisplayNodeIDs()
Remove all display node IDs and associated display nodes.
virtual const char * GetDisplayNodeReferenceRole()
void operator=(const vtkMRMLDisplayableNode &)
const char * GetNodeTagName() override=0
Get node XML tag name (like Volume, Model)
virtual void CreateDefaultDisplayNodes()
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
virtual const char * GetDisplayNodeReferenceMRMLAttributeName()
void OnNodeReferenceModified(vtkMRMLNodeReference *reference) override
Called when a node reference ID is modified.
vtkMRMLDisplayNode * GetDisplayNode()
void SetAndObserveNthDisplayNodeID(int n, const char *displayNodeID)
static const char * DisplayNodeReferenceRole
static const char * DisplayNodeReferenceMRMLAttributeName
vtkMRMLDisplayableNode(const vtkMRMLDisplayableNode &)
Class to hold information about a node reference.