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
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
64 vtkSetClampMacro(NumberOfCompareViewLightboxRows, int, 1, 50);
66 vtkSetClampMacro(NumberOfCompareViewLightboxColumns, int, 1, 50);
67
70 vtkGetMacro(MainPanelSize, int);
71 vtkSetMacro(MainPanelSize, int);
72 vtkGetMacro(SecondaryPanelSize, int);
73 vtkSetMacro(SecondaryPanelSize, int);
74
77 vtkGetStringMacro(SelectedModule);
78 vtkSetStringMacro(SelectedModule);
79
82 vtkMRMLAbstractViewNode* GetMaximizedViewNode(int maximizedViewNodeIndex);
88
90 const char* GetNodeTagName() override {return "Layout";}
91
93 {
109 SlicerLayoutTriple3DEndoscopyView = 19, // Up to here, all layouts are Slicer 3 compatible
128 SlicerLayoutFinalView, // special value, must be placed after the last standard view (used for iterating through all the views)
129
133 };
134
138 bool AddLayoutDescription(int layout, const char* layoutDescription);
139
144 bool SetLayoutDescription(int layout, const char* layoutDescription);
145
147 std::vector<int> GetLayoutIndices();
148
150 bool IsLayoutDescription(int layout);
151
154 std::string GetLayoutDescription(int layout);
155
159
160 // Get the layout description currently displayed. Used
161 // internally. This is XML description corresponding to the ivar
162 // ViewArrangement which is the integer identifier for the
163 // layout. ViewArrangement and CurrentViewDescription may not
164 // correspond while a view is being switched.
165 vtkGetStringMacro(CurrentLayoutDescription);
166
167 // Get the XML data model of the CurrentViewDescription
168 vtkGetObjectMacro(LayoutRootElement, vtkXMLDataElement);
169
170 // You are responsible to delete the returned dataElement.
171 static vtkXMLDataElement* ParseLayout(const char* description);
172
173protected:
175 void SetAndParseCurrentLayoutDescription(const char* description);
176 vtkSetStringMacro(CurrentLayoutDescription);
177
178protected:
183
193
195
198
199 std::map<int, std::string> Layouts;
201 vtkXMLDataElement* LayoutRootElement;
202};
203
204#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.
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()
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)
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 AddMaximizedViewNode(vtkMRMLAbstractViewNode *maximizedViewNode)