Slicer  4.11
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 
7 class vtkXMLDataElement;
8 
13 class VTK_MRML_EXPORT vtkMRMLLayoutNode : public vtkMRMLAbstractLayoutNode
14 {
15 public:
16  static vtkMRMLLayoutNode *New();
18  vtkMRMLNode* CreateNodeInstance() override;
19  void PrintSelf(ostream& os, vtkIndent indent) override;
20 
21  //--------------------------------------------------------------------------
23  //--------------------------------------------------------------------------
24 
26  void ReadXMLAttributes( const char** atts) override;
27 
29  void WriteXML(ostream& of, int indent) override;
30 
32  void Copy(vtkMRMLNode *node) override;
33 
35  vtkGetMacro(ViewArrangement, int);
36  virtual void SetViewArrangement(int);
37 
38  vtkGetMacro(GUIPanelVisibility, int);
39  vtkSetMacro(GUIPanelVisibility, int);
40 
41  vtkGetMacro(BottomPanelVisibility, int);
42  vtkSetMacro(BottomPanelVisibility, int);
43 
45  vtkGetMacro(GUIPanelLR, int);
46  vtkSetMacro(GUIPanelLR, int);
47 
49  vtkGetMacro(CollapseSliceControllers, int);
50  vtkSetMacro(CollapseSliceControllers, int);
51 
53  vtkGetMacro(NumberOfCompareViewRows, int);
54  vtkSetClampMacro(NumberOfCompareViewRows, int, 1, 50);
55  vtkGetMacro(NumberOfCompareViewColumns, int);
56  vtkSetClampMacro(NumberOfCompareViewColumns, int, 1, 50);
57 
59  vtkGetMacro(NumberOfCompareViewLightboxRows, int);
60  vtkSetClampMacro(NumberOfCompareViewLightboxRows, int, 1, 50);
61  vtkGetMacro(NumberOfCompareViewLightboxColumns, int);
62  vtkSetClampMacro(NumberOfCompareViewLightboxColumns, int, 1, 50);
63 
66  vtkGetMacro(MainPanelSize, int);
67  vtkSetMacro(MainPanelSize, int);
68  vtkGetMacro(SecondaryPanelSize, int);
69  vtkSetMacro(SecondaryPanelSize, int);
70 
72  vtkGetStringMacro(SelectedModule);
73  vtkSetStringMacro(SelectedModule);
74 
76  const char* GetNodeTagName() override {return "Layout";}
77 
79  {
80  SlicerLayoutInitialView = 0,
81  SlicerLayoutDefaultView = 1,
82  SlicerLayoutConventionalView = 2,
83  SlicerLayoutFourUpView = 3,
84  SlicerLayoutOneUp3DView = 4,
85  SlicerLayoutOneUpSliceView = 5, // XXX Slicer 4.5 - Remove this value. Here only for backward compatibility.
86  SlicerLayoutOneUpRedSliceView = 6,
87  SlicerLayoutOneUpYellowSliceView = 7,
88  SlicerLayoutOneUpGreenSliceView = 8,
89  SlicerLayoutTabbed3DView = 9,
90  SlicerLayoutTabbedSliceView = 10,
91  SlicerLayoutLightboxView = 11, // XXX Slicer 4.5 - Remove this value. Here only for backward compatibility.
92  SlicerLayoutCompareView = 12,
93  SlicerLayoutSideBySideLightboxView = 13, // XXX Slicer 4.5 - Remove this value. Here only for backward compatibility.
94  SlicerLayoutNone = 14,
95  SlicerLayoutDual3DView = 15,
96  SlicerLayoutConventionalWidescreenView = 16,
97  SlicerLayoutCompareWidescreenView = 17,
98  SlicerLayoutSingleLightboxView = 18, // XXX Slicer 4.5 - Remove this value. Here only for backward compatibility.
99  SlicerLayoutTriple3DEndoscopyView = 19, // Up to here, all layouts are Slicer 3 compatible
100  SlicerLayout3DPlusLightboxView = 20, // XXX Slicer 4.5 - Remove this value. Here only for backward compatibility.
101  SlicerLayoutThreeOverThreeView = 21,
102  SlicerLayoutFourOverFourView = 22,
103  SlicerLayoutCompareGridView = 23,
104  SlicerLayoutConventionalQuantitativeView = 24,
105  SlicerLayoutFourUpQuantitativeView = 25,
106  SlicerLayoutOneUpQuantitativeView = 26,
107  SlicerLayoutTwoOverTwoView = 27,
108  SlicerLayoutThreeOverThreeQuantitativeView = 28,
109  SlicerLayoutSideBySideView = 29,
110  SlicerLayoutFourByThreeSliceView = 30,
111  SlicerLayoutFourByTwoSliceView = 31,
112  SlicerLayoutFiveByTwoSliceView = 32,
113  SlicerLayoutThreeByThreeSliceView = 33,
114  SlicerLayoutFourUpTableView = 34,
115  SlicerLayout3DTableView = 35,
116  SlicerLayoutConventionalPlotView = 36,
117  SlicerLayoutFourUpPlotView = 37,
118  SlicerLayoutFourUpPlotTableView = 38,
119  SlicerLayoutOneUpPlotView = 39,
120  SlicerLayoutThreeOverThreePlotView = 40,
121  SlicerLayoutDicomBrowserView = 41,
122  SlicerLayoutFinalView, // special value, must be placed after the last standard view (used for iterating through all the views)
123 
124  SlicerLayoutMaximizedView = 98,
125  SlicerLayoutCustomView = 99,
126  SlicerLayoutUserView = 100
127  };
128 
132  bool AddLayoutDescription(int layout, const char* layoutDescription);
133 
137  bool SetLayoutDescription(int layout, const char* layoutDescription);
138 
140  bool IsLayoutDescription(int layout);
141 
144  std::string GetLayoutDescription(int layout);
145 
146  // Get the layout description currently displayed. Used
147  // internally. This is XML description corresponding to the ivar
148  // ViewArrangement which is the integer identifier for the
149  // layout. ViewArrangement and CurrentViewDescription may not
150  // correspond while a view is being switched.
151  vtkGetStringMacro(CurrentLayoutDescription);
152 
153  // Get the XML data model of the CurrentViewDescription
154  vtkGetObjectMacro(LayoutRootElement, vtkXMLDataElement);
155 
156  // You are responsible to delete the returned dataElement.
157  static vtkXMLDataElement* ParseLayout(const char* description);
158 
159 protected:
160  void UpdateCurrentLayoutDescription();
161  void SetAndParseCurrentLayoutDescription(const char* description);
162  vtkSetStringMacro(CurrentLayoutDescription);
163 
164 protected:
166  ~vtkMRMLLayoutNode() override;
168  void operator=(const vtkMRMLLayoutNode&);
169 
179 
181 
184 
185  std::map<int, std::string> Layouts;
187  vtkXMLDataElement* LayoutRootElement;
188 };
189 
190 #endif
void WriteXML(ostream &of, int indent) override
Write this node&#39;s information to a MRML file in XML format.
vtkXMLDataElement * LayoutRootElement
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
Node that describes the view layout of the application.
std::map< int, std::string > Layouts
void operator=(const vtkMRMLAbstractLayoutNode &)
void ReadXMLAttributes(const char **atts) override
Set node attributes.
Node that describes the view layout of the application.
void Copy(vtkMRMLNode *node) override
Copy the node&#39;s attributes to this object.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)