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
vtkMRMLViewLogic.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Kapteyn Astronomical Institute
4 University of Groningen, Groningen, Netherlands. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Davide Punzo, Kapteyn Astronomical Institute,
16 and was supported through the European Research Council grant nr. 291531.
17
18==============================================================================*/
19
20#ifndef __vtkMRMLViewLogic_h
21#define __vtkMRMLViewLogic_h
22
23// MRMLLogic includes
25
26// STD includes
27#include <vector>
28#include <deque>
29
34class vtkMRMLViewNode;
37
38class vtkAlgorithmOutput;
39class vtkCollection;
40class vtkImageBlend;
41class vtkTransform;
42class vtkImageData;
43class vtkImageReslice;
44class vtkTransform;
45
46struct SliceLayerInfo;
47struct BlendPipeline;
48
55class VTK_MRML_LOGIC_EXPORT vtkMRMLViewLogic : public vtkMRMLAbstractLogic
56{
57public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64 virtual void SetName(const char* name);
65 virtual const char* GetName() const;
66
68 vtkGetObjectMacro (ViewNode, vtkMRMLViewNode);
69
71 vtkGetObjectMacro (CameraNode, vtkMRMLCameraNode);
72
76 void StartCameraNodeInteraction(unsigned int parameters);
77
80
84 void StartViewNodeInteraction(unsigned int parameters);
85
88
90 vtkMRMLViewNode* AddViewNode(const char* layoutName);
91
95 const char* layoutName);
96
100 const char* layoutName);
101
102protected:
105
106 void SetMRMLSceneInternal(vtkMRMLScene* newScene) override;
107 void SetViewNode(vtkMRMLViewNode* newViewNode);
108 void SetCameraNode(vtkMRMLCameraNode* newCameraNode);
109
110 void OnMRMLSceneNodeAdded(vtkMRMLNode* node) override;
112 void UpdateFromMRMLScene() override;
113
115
116 // View and camera nodes are looked up from the scene based on the layout name.
117 std::string Name;
118
122
123private:
124 vtkMRMLViewLogic(const vtkMRMLViewLogic&) = delete;
125 void operator=(const vtkMRMLViewLogic&) = delete;
126
127};
128
129#endif
MRML node to represent camera node.
Abstract class that contains graphical display properties for displayable nodes.
MRML node for representing a linear transformation.
MRML node to represent a display property of 3D surface model.
MRML node to represent a 3D surface model.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
void SetMRMLSceneInternal(vtkMRMLScene *newScene) override
void EndCameraNodeInteraction()
Indicate an interaction with the slice node has been completed.
static vtkMRMLCameraNode * GetCameraNode(vtkMRMLScene *scene, const char *layoutName)
virtual const char * GetName() const
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMRMLViewNode * AddViewNode(const char *layoutName)
Convenience function for adding a view node and setting it in this logic.
virtual void SetName(const char *name)
Set/Get layout name. This is used for finding the camera and view node in the scene.
vtkMRMLCameraNode * CameraNode
void SetViewNode(vtkMRMLViewNode *newViewNode)
void OnMRMLSceneNodeAdded(vtkMRMLNode *node) override
void StartViewNodeInteraction(unsigned int parameters)
void EndViewNodeInteraction()
Indicate an interaction with the view node has been completed.
void StartCameraNodeInteraction(unsigned int parameters)
~vtkMRMLViewLogic() override
void UpdateMRMLNodes()
static vtkMRMLViewNode * GetViewNode(vtkMRMLScene *scene, const char *layoutName)
void SetCameraNode(vtkMRMLCameraNode *newCameraNode)
void OnMRMLSceneNodeRemoved(vtkMRMLNode *node) override
vtkMRMLViewNode * ViewNode
void UpdateFromMRMLScene() override
static vtkMRMLViewLogic * New()
The Usual VTK class functions.
MRML node to represent a 3D view.
MRML node for representing a volume (image stack).