Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLLayoutNode.h
Go to the documentation of this file.
1#ifndef __vtkMRMLLayoutNode_h
2#define __vtkMRMLLayoutNode_h
3
4// MRML includes
6
7class vtkXMLDataElement;
9
14class VTK_MRML_EXPORT vtkMRMLLayoutNode : public vtkMRMLAbstractLayoutNode
15{
16public:
20 void PrintSelf(ostream& os, vtkIndent indent) override;
21
22 //--------------------------------------------------------------------------
24 //--------------------------------------------------------------------------
25
27 void ReadXMLAttributes( const char** atts) override;
28
30 void WriteXML(ostream& of, int indent) override;
31
33 void Copy(vtkMRMLNode *node) override;
34
36 void Reset(vtkMRMLNode* defaultNode) override;
37
39 vtkGetMacro(ViewArrangement, int);
40 virtual void SetViewArrangement(int);
41
42 vtkGetMacro(GUIPanelVisibility, int);
43 vtkSetMacro(GUIPanelVisibility, int);
44
45 vtkGetMacro(BottomPanelVisibility, int);
46 vtkSetMacro(BottomPanelVisibility, int);
47
49 vtkGetMacro(GUIPanelLR, int);
50 vtkSetMacro(GUIPanelLR, int);
51
53 vtkGetMacro(CollapseSliceControllers, int);
54 vtkSetMacro(CollapseSliceControllers, int);
55
57 vtkGetMacro(NumberOfCompareViewRows, int);
58 vtkSetClampMacro(NumberOfCompareViewRows, int, 1, 50);
59 vtkGetMacro(NumberOfCompareViewColumns, int);
60 vtkSetClampMacro(NumberOfCompareViewColumns, int, 1, 50);
61
63 vtkGetMacro(NumberOfCompareViewLightboxRows, int);
64 vtkSetClampMacro(NumberOfCompareViewLightboxRows, int, 1, 50);
65 vtkGetMacro(NumberOfCompareViewLightboxColumns, int);
66 vtkSetClampMacro(NumberOfCompareViewLightboxColumns, int, 1, 50);
67
70 vtkGetMacro(MainPanelSize, int);
71 vtkSetMacro(MainPanelSize, int);
72 vtkGetMacro(SecondaryPanelSize, int);
73 vtkSetMacro(SecondaryPanelSize, int);
74
76 vtkGetStringMacro(SelectedModule);
77 vtkSetStringMacro(SelectedModule);
78
81 vtkMRMLAbstractViewNode* GetMaximizedViewNode(int maximizedViewNodeIndex);
87
89 const char* GetNodeTagName() override {return "Layout";}
90
92 {
93 SlicerLayoutInitialView = 0,
94 SlicerLayoutDefaultView = 1,
95 SlicerLayoutConventionalView = 2,
96 SlicerLayoutFourUpView = 3,
97 SlicerLayoutOneUp3DView = 4,
98 SlicerLayoutOneUpRedSliceView = 6,
99 SlicerLayoutOneUpYellowSliceView = 7,
100 SlicerLayoutOneUpGreenSliceView = 8,
101 SlicerLayoutTabbed3DView = 9,
102 SlicerLayoutTabbedSliceView = 10,
103 SlicerLayoutCompareView = 12,
104 SlicerLayoutNone = 14,
105 SlicerLayoutDual3DView = 15,
106 SlicerLayoutConventionalWidescreenView = 16,
107 SlicerLayoutCompareWidescreenView = 17,
108 SlicerLayoutTriple3DEndoscopyView = 19, // Up to here, all layouts are Slicer 3 compatible
109 SlicerLayoutThreeOverThreeView = 21,
110 SlicerLayoutFourOverFourView = 22,
111 SlicerLayoutCompareGridView = 23,
112 SlicerLayoutTwoOverTwoView = 27,
113 SlicerLayoutSideBySideView = 29,
114 SlicerLayoutFourByThreeSliceView = 30,
115 SlicerLayoutFourByTwoSliceView = 31,
116 SlicerLayoutFiveByTwoSliceView = 32,
117 SlicerLayoutThreeByThreeSliceView = 33,
118 SlicerLayoutFourUpTableView = 34,
119 SlicerLayout3DTableView = 35,
120 SlicerLayoutConventionalPlotView = 36,
121 SlicerLayoutFourUpPlotView = 37,
122 SlicerLayoutFourUpPlotTableView = 38,
123 SlicerLayoutOneUpPlotView = 39,
124 SlicerLayoutThreeOverThreePlotView = 40,
125 SlicerLayoutDicomBrowserView = 41,
126 SlicerLayoutDualMonitorFourUpView = 42,
127 SlicerLayoutFinalView, // special value, must be placed after the last standard view (used for iterating through all the views)
128
129 SlicerLayoutMaximizedView = 98,
130 SlicerLayoutCustomView = 99,
131 SlicerLayoutUserView = 100
132 };
133
137 bool AddLayoutDescription(int layout, const char* layoutDescription);
138
142 bool SetLayoutDescription(int layout, const char* layoutDescription);
143
145 bool IsLayoutDescription(int layout);
146
149 std::string GetLayoutDescription(int layout);
150
151 // Get the layout description currently displayed. Used
152 // internally. This is XML description corresponding to the ivar
153 // ViewArrangement which is the integer identifier for the
154 // layout. ViewArrangement and CurrentViewDescription may not
155 // correspond while a view is being switched.
156 vtkGetStringMacro(CurrentLayoutDescription);
157
158 // Get the XML data model of the CurrentViewDescription
159 vtkGetObjectMacro(LayoutRootElement, vtkXMLDataElement);
160
161 // You are responsible to delete the returned dataElement.
162 static vtkXMLDataElement* ParseLayout(const char* description);
163
164protected:
166 void SetAndParseCurrentLayoutDescription(const char* description);
167 vtkSetStringMacro(CurrentLayoutDescription);
168
169protected:
174
184
186
189
190 std::map<int, std::string> Layouts;
192 vtkXMLDataElement* LayoutRootElement;
193};
194
195#endif
Node that describes the view layout of the application.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Node that describes the view layout of the application.
bool IsLayoutDescription(int layout)
Query whether a layout exists with a specified integer identifier.
void ReadXMLAttributes(const char **atts) override
MRML methods.
vtkMRMLAbstractViewNode * GetMaximizedViewNode(int maximizedViewNodeIndex)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
std::string GetLayoutDescription(int layout)
bool AddLayoutDescription(int layout, const char *layoutDescription)
void UpdateCurrentLayoutDescription()
void RemoveAllMaximizedViewNodes()
bool SetLayoutDescription(int layout, const char *layoutDescription)
vtkMRMLLayoutNode(const vtkMRMLLayoutNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void SetViewArrangement(int)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
static vtkMRMLLayoutNode * New()
int GetNumberOfMaximizedViewNodes()
std::map< int, std::string > Layouts
bool IsMaximizedViewNode(vtkMRMLAbstractViewNode *viewNode)
void operator=(const vtkMRMLLayoutNode &)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
static vtkXMLDataElement * ParseLayout(const char *description)
~vtkMRMLLayoutNode() override
void RemoveMaximizedViewNode(vtkMRMLAbstractViewNode *maximizedViewNode)
void Reset(vtkMRMLNode *defaultNode) override
Reimplemented to reset maximized view node.
vtkXMLDataElement * LayoutRootElement
void SetAndParseCurrentLayoutDescription(const char *description)
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
void AddMaximizedViewNode(vtkMRMLAbstractViewNode *maximizedViewNode)
Abstract Superclass for all specific types of MRML nodes.