/
vtkMRMLWatchdogDisplayNode.h
103 lines (76 loc) · 3.39 KB
/
vtkMRMLWatchdogDisplayNode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*==============================================================================
Program: 3D Slicer
Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This file was originally developed by Andras Lasso and Franklin King at
PerkLab, Queen's University and was supported through the Applied Cancer
Research Unit program of Cancer Care Ontario with funds provided by the
Ontario Ministry of Health and Long-Term Care.
==============================================================================*/
#ifndef __vtkMRMLWatchdogDisplayNode_h
#define __vtkMRMLWatchdogDisplayNode_h
#include "vtkMRMLDisplayNode.h"
// Watchdog includes
#include "vtkSlicerWatchdogModuleMRMLExport.h"
/// \brief MRML node to represent display properties for watchdog visualization in the slice and 3D viewers.
///
/// vtkMRMLWatchdogDisplayNode nodes store display properties of watchdogs.
class VTK_SLICER_WATCHDOG_MODULE_MRML_EXPORT vtkMRMLWatchdogDisplayNode : public vtkMRMLDisplayNode
{
public:
static vtkMRMLWatchdogDisplayNode *New ( );
vtkTypeMacro ( vtkMRMLWatchdogDisplayNode,vtkMRMLDisplayNode );
void PrintSelf ( ostream& os, vtkIndent indent ) override;
enum Position
{
POSITION_TOP_LEFT,
POSITION_BOTTOM_LEFT,
POSITION_TOP_RIGHT,
POSITION_BOTTOM_RIGHT,
POSITION_LAST // this should be the last type of position
};
//--------------------------------------------------------------------------
/// MRMLNode methods
//--------------------------------------------------------------------------
virtual vtkMRMLNode* CreateNodeInstance() override;
///
/// Read node attributes from XML (MRML) file
virtual void ReadXMLAttributes ( const char** atts ) override;
///
/// Write this node's information to a MRML file in XML format.
virtual void WriteXML ( ostream& of, int indent ) override;
///
/// Copy the node's attributes to this object
virtual void Copy ( vtkMRMLNode *node ) override;
///
/// Get node XML tag name (like Volume, UnstructuredGrid)
virtual const char* GetNodeTagName() override {return "WatchdogDisplayNode";};
//--------------------------------------------------------------------------
/// Display options
//--------------------------------------------------------------------------
vtkSetMacro(Position, int);
vtkGetMacro(Position, int);
/// Convert position index to a string for serialization.
/// Returns an empty string if the index is unknown.
static const char* ConvertPositionToString(int positionIndex);
/// Convert position string to an index that can be set in Position.
/// Returns -1 if the string is unknown.
static int ConvertPositionFromString(const char* positionString);
vtkSetMacro(FontSize, int);
vtkGetMacro(FontSize, int);
protected:
int Position;
int FontSize;
protected:
vtkMRMLWatchdogDisplayNode ( );
~vtkMRMLWatchdogDisplayNode ( );
vtkMRMLWatchdogDisplayNode ( const vtkMRMLWatchdogDisplayNode& );
void operator= ( const vtkMRMLWatchdogDisplayNode& );
};
#endif