21#ifndef __vtkMRMLLayoutLogic_h
22#define __vtkMRMLLayoutLogic_h
26#include "vtkMRMLLogicExport.h"
34class vtkXMLDataElement;
78 void PrintSelf(ostream& os, vtkIndent indent)
override;
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
void PrintSelf(ostream &os, vtkIndent indent) override
std::map< std::string, std::string > ViewAttributes
void CreateMaximizedViewLayoutDescription(int layout, vtkMRMLAbstractViewNode *viewToMaximize)
void operator=(const vtkMRMLLayoutLogic &)
void SetMRMLSceneInternal(vtkMRMLScene *newScene) override
Reimplemented to listen to specific scene events.
void UpdateViewCollectionsFromLayout()
Make sure the view node list mapped in the current layout is up-to-date.
vtkXMLDataElement * GetNextElement(vtkXMLDataElement *element)
ViewProperties GetViewElementProperties(vtkXMLDataElement *viewElement) const
void UpdateCompareViewLayoutDefinitions()
vtkXMLDataElement * ConventionalLayoutRootElement
void CreateMissingViews()
void UpdateFromMRMLScene() override
ViewAttributes GetViewElementAttributes(vtkXMLDataElement *viewElement) const
vtkMRMLNode * CreateViewFromAttributes(const ViewAttributes &attributes)
void ApplyProperty(const ViewProperty &property, vtkMRMLNode *view)
vtkXMLDataElement * GetViewportElementForView(vtkXMLDataElement *layoutRootElement, vtkMRMLAbstractViewNode *viewNode)
vtkCollection * GetViewsFromLayout(vtkXMLDataElement *root)
vtkMRMLLayoutLogic()
Logic constructor.
vtkCollection * GetViewsFromAttributes(const ViewAttributes &attributes)
This returns the best view node that matches the attributes.
int LastValidViewArrangement
std::string GetMaximizedViewLayoutDescription(vtkMRMLAbstractViewNode *viewToMaximize, const char *currentLayoutDescription)
Returns layout description that shows the specified view maximized.
void ApplyProperties(const ViewProperties &properties, vtkMRMLNode *view, const std::string &action)
vtkCollection * ViewNodes
Up-to-date list of the nodes that are mapped into the scene.
~vtkMRMLLayoutLogic() override
Logic destructor.
ViewProperty GetViewElementProperty(vtkXMLDataElement *viewProperty) const
vtkMRMLNode * GetViewFromAttributes(const ViewAttributes &attributes)
This returns the best view node that matches the attributes.
void SetLayoutNode(vtkMRMLLayoutNode *layoutNode)
Not public as we internally take care of choosing/updating the layout node.
void OnMRMLSceneEndRestore() override
void CreateMissingViews(vtkXMLDataElement *layoutRootElement)
void UpdateFromLayoutNode()
Update the logic when the layout node is set or modified.
vtkMRMLNode * GetViewFromElement(vtkXMLDataElement *element)
std::vector< ViewProperty > ViewProperties
vtkMRMLLayoutNode * LayoutNode
Pointer on the unique Layout node of the mrml node.
vtkMRMLLayoutLogic(const vtkMRMLLayoutLogic &)
void UnobserveMRMLScene() override
void OnMRMLNodeModified(vtkMRMLNode *node) override
void MaximizeView(vtkMRMLAbstractViewNode *viewToMaximize)
ViewAttributes ViewProperty
virtual void AddDefaultLayouts()
static vtkMRMLLayoutLogic * New()
The Usual vtk class functions.
void OnMRMLSceneStartRestore() override
vtkXMLDataElement * GetNextViewElement(vtkXMLDataElement *viewElement)
Utility functions to browse XML data elements.
Node that describes the view layout of the application.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.