Slicer 5.9
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
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*/,
163 unsigned long /*event*/,
164 void * /*callData*/ ) override;
165
174 enum
175 {
177 };
178
183
188
193 virtual int GetDisplayVisibility();
194 virtual void SetDisplayVisibility(int visible);
195
199 virtual int GetDisplayClassVisibility(const char* nodeClass);
200 virtual void SetDisplayClassVisibility(const char* nodeClass, int visible);
201
206 virtual void GetRASBounds(double bounds[6]);
207
211 virtual void GetBounds(double bounds[6]);
212
213 virtual const char* GetDisplayNodeReferenceRole();
214
218 void SetSelectable(int) override;
219
220protected:
225
226 static const char* DisplayNodeReferenceRole;
228
230
234
238
242
243private:
246 std::vector<vtkMRMLDisplayNode *> DisplayNodes;
247};
248
249#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.