Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLLayoutNode.h
Go to the documentation of this file.
1 #ifndef __vtkMRMLLayoutNode_h
2 #define __vtkMRMLLayoutNode_h
3 
4 // MRML includes
5 #include "vtkMRMLNode.h"
6 
7 class vtkXMLDataElement;
8 
13 class VTK_MRML_EXPORT vtkMRMLLayoutNode : public vtkMRMLNode
14 {
15 public:
16  static vtkMRMLLayoutNode *New();
18  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
19  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
20 
21  //--------------------------------------------------------------------------
23  //--------------------------------------------------------------------------
24 
26  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
27 
29  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
30 
32  virtual void Copy(vtkMRMLNode *node) VTK_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  virtual const char* GetNodeTagName() VTK_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  SlicerLayoutFinalView, // special value, must be placed after the last standard view (used for iterating through all the views)
122 
123  SlicerLayoutMaximizedView = 98,
124  SlicerLayoutCustomView = 99,
125  SlicerLayoutUserView = 100
126  };
127 
131  bool AddLayoutDescription(int layout, const char* layoutDescription);
132 
136  bool SetLayoutDescription(int layout, const char* layoutDescription);
137 
139  bool IsLayoutDescription(int layout);
140 
143  std::string GetLayoutDescription(int layout);
144 
145  // Get the layout description currently displayed. Used
146  // internally. This is XML description corresponding to the ivar
147  // ViewArrangement which is the integer identifier for the
148  // layout. ViewArrangement and CurrentViewDescription may not
149  // correspond while a view is being switched.
150  vtkGetStringMacro(CurrentLayoutDescription);
151 
152  // Get the XML data model of the CurrentViewDescription
153  vtkGetObjectMacro(LayoutRootElement, vtkXMLDataElement);
154 
155  // You are responsible to delete the returned dataElement.
156  static vtkXMLDataElement* ParseLayout(const char* description);
157 
158 protected:
159  void UpdateCurrentLayoutDescription();
160  void SetAndParseCurrentLayoutDescription(const char* description);
161  vtkSetStringMacro(CurrentLayoutDescription);
162 
163 protected:
167  void operator=(const vtkMRMLLayoutNode&);
168 
178 
180 
183 
184  std::map<int, std::string> Layouts;
186  vtkXMLDataElement* LayoutRootElement;
187 };
188 
189 #endif
vtkXMLDataElement * LayoutRootElement
void operator=(const vtkMRMLNode &)
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
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135