Slicer 5.9
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 CopyContent(vtkMRMLNode* node, bool deepCopy = true) 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
67 {
68 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
69 return 1;
70 }
71 void SetNumberOfCompareViewLightboxRows(int vtkNotUsed(value)) //
72 {
73 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
74 }
76 {
77 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
78 return 1;
79 }
81 {
82 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
83 return 1;
84 }
86 {
87 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
88 return 1;
89 }
90 void SetNumberOfCompareViewLightboxColumns(int vtkNotUsed(value)) //
91 {
92 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
93 }
95 {
96 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
97 return 1;
98 }
100 {
101 vtkWarningMacro("" << __func__ << ": Function is deprecated. LightBox support has been removed.");
102 return 1;
103 }
104
105
108 vtkGetMacro(MainPanelSize, int);
109 vtkSetMacro(MainPanelSize, int);
110 vtkGetMacro(SecondaryPanelSize, int);
111 vtkSetMacro(SecondaryPanelSize, int);
112
115 vtkGetStringMacro(SelectedModule);
116 vtkSetStringMacro(SelectedModule);
117
120 vtkMRMLAbstractViewNode* GetMaximizedViewNode(int maximizedViewNodeIndex);
126
128 const char* GetNodeTagName() override { return "Layout"; }
129
131 {
146 SlicerLayoutTriple3DEndoscopyView = 19, // Up to here, all layouts are Slicer 3 compatible
165 SlicerLayoutFinalView, // special value, must be placed after the last standard view (used for iterating through all the views)
166
170 };
171
175 bool AddLayoutDescription(int layout, const char* layoutDescription);
176
181 bool SetLayoutDescription(int layout, const char* layoutDescription);
182
184 std::vector<int> GetLayoutIndices();
185
187 bool IsLayoutDescription(int layout);
188
191 std::string GetLayoutDescription(int layout);
192
196
197 // Get the layout description currently displayed. Used
198 // internally. This is XML description corresponding to the ivar
199 // ViewArrangement which is the integer identifier for the
200 // layout. ViewArrangement and CurrentViewDescription may not
201 // correspond while a view is being switched.
202 vtkGetStringMacro(CurrentLayoutDescription);
203
204 // Get the XML data model of the CurrentViewDescription
205 vtkGetObjectMacro(LayoutRootElement, vtkXMLDataElement);
206
207 // You are responsible to delete the returned dataElement.
208 static vtkXMLDataElement* ParseLayout(const char* description);
209
210protected:
212 void SetAndParseCurrentLayoutDescription(const char* description);
213 vtkSetStringMacro(CurrentLayoutDescription);
214
215protected:
220
228
230
233
234 std::map<int, std::string> Layouts;
236 vtkXMLDataElement* LayoutRootElement;
237};
238
239#endif
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
bool IsLayoutDescription(int layout)
Query whether a layout exists with a specified integer identifier.
void CopyLayoutDescriptions(vtkMRMLLayoutNode *source)
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.
void SetNumberOfCompareViewLightboxColumns(int vtkNotUsed(value))
std::string GetLayoutDescription(int layout)
bool AddLayoutDescription(int layout, const char *layoutDescription)
std::vector< int > GetLayoutIndices()
Get list of all specified layout indices.
void UpdateCurrentLayoutDescription()
int GetNumberOfCompareViewLightboxRowsMinValue()
int GetNumberOfCompareViewLightboxColumnsMaxValue()
void RemoveAllMaximizedViewNodes()
bool SetLayoutDescription(int layout, const char *layoutDescription)
vtkMRMLLayoutNode(const vtkMRMLLayoutNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
void CopyContent(vtkMRMLNode *node, bool deepCopy=true) override
Copy the node's attributes to this object.
virtual void SetViewArrangement(int)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
int GetNumberOfCompareViewLightboxColumns()
static vtkMRMLLayoutNode * New()
int GetNumberOfMaximizedViewNodes()
std::map< int, std::string > Layouts
int GetNumberOfCompareViewLightboxRowsMaxValue()
bool IsMaximizedViewNode(vtkMRMLAbstractViewNode *viewNode)
int GetNumberOfCompareViewLightboxColumnsMinValue()
void operator=(const vtkMRMLLayoutNode &)
void SetNumberOfCompareViewLightboxRows(int vtkNotUsed(value))
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)
int GetNumberOfCompareViewLightboxRows()
void AddMaximizedViewNode(vtkMRMLAbstractViewNode *maximizedViewNode)