21 #ifndef __vtkMRMLLayoutLogic_h 22 #define __vtkMRMLLayoutLogic_h 26 #include "vtkMRMLLogicExport.h" 34 class vtkXMLDataElement;
78 virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
86 virtual void AddDefaultLayouts();
91 vtkMRMLNode* GetViewFromElement(vtkXMLDataElement* element);
93 vtkMRMLNode* GetViewFromAttributes(
const ViewAttributes& attributes);
96 vtkCollection* GetViewsFromAttributes(
const ViewAttributes& attributes);
98 vtkMRMLNode* CreateViewFromAttributes(
const ViewAttributes& attributes);
100 void ApplyProperties(
const ViewProperties& properties,
vtkMRMLNode* view,
const std::string& action);
101 void ApplyProperty(
const ViewProperty& property,
vtkMRMLNode* view);
105 vtkGetObjectMacro(ViewNodes, vtkCollection);
120 void CreateMaximizedViewLayoutDescription(
int layout,
137 virtual
void OnMRMLSceneEndRestore() VTK_OVERRIDE;
139 virtual
void UnobserveMRMLScene() VTK_OVERRIDE;
140 virtual
void UpdateFromMRMLScene() VTK_OVERRIDE;
144 void UpdateViewNodes();
148 void UpdateLayoutNode();
154 void UpdateFromLayoutNode();
156 void UpdateViewCollectionsFromLayout();
157 void CreateMissingViews();
158 void CreateMissingViews(vtkXMLDataElement* layoutRootElement);
162 vtkCollection* GetViewsFromLayout(vtkXMLDataElement* root);
166 void UpdateCompareViewLayoutDefinitions();
169 vtkXMLDataElement* GetNextViewElement(vtkXMLDataElement* viewElement);
170 vtkXMLDataElement* GetNextElement(vtkXMLDataElement* element);
171 ViewAttributes GetViewElementAttributes(vtkXMLDataElement* viewElement)const;
172 ViewProperties GetViewElementProperties(vtkXMLDataElement* viewElement)const;
173 ViewProperty GetViewElementProperty(vtkXMLDataElement* viewProperty)const;
177 int LastValidViewArrangement;
179 vtkCollection* ViewNodes;
180 vtkXMLDataElement* ConventionalLayoutRootElement;
Superclass for MRML logic classes.
std::vector< ViewProperty > ViewProperties
MRML logic class for layout manipulation.
Node that describes the view layout of the application.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void OnMRMLNodeModified(vtkMRMLNode *)
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D...
A set of MRML Nodes that supports serialization and undo/redo.
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
virtual void OnMRMLSceneStartRestore()
Abstract Superclass for all specific types of MRML nodes.
std::map< std::string, std::string > ViewAttributes
ViewAttributes ViewProperty
static vtkMRMLAbstractLogic * New()