Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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
24 #include "vtkMRMLAbstractLogic.h"
25 
26 // STD includes
27 #include <vector>
28 #include <deque>
29 
30 class vtkMRMLDisplayNode;
33 class vtkMRMLModelNode;
34 class vtkMRMLViewNode;
35 class vtkMRMLCameraNode;
36 class vtkMRMLVolumeNode;
37 
38 class vtkAlgorithmOutput;
39 class vtkCollection;
40 class vtkImageBlend;
41 class vtkTransform;
42 class vtkImageData;
43 class vtkImageReslice;
44 class vtkTransform;
45 
46 struct SliceLayerInfo;
47 struct BlendPipeline;
48 
55 class VTK_MRML_LOGIC_EXPORT vtkMRMLViewLogic : public vtkMRMLAbstractLogic
56 {
57 public:
59  static vtkMRMLViewLogic *New();
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 
79  void EndCameraNodeInteraction();
80 
84  void StartViewNodeInteraction(unsigned int parameters);
85 
87  void EndViewNodeInteraction();
88 
90  vtkMRMLViewNode* AddViewNode(const char* layoutName);
91 
94  static vtkMRMLViewNode* GetViewNode(vtkMRMLScene* scene,
95  const char* layoutName);
96 
99  static vtkMRMLCameraNode* GetCameraNode(vtkMRMLScene* scene,
100  const char* layoutName);
101 
102 protected:
104  ~vtkMRMLViewLogic() override;
105 
106  void SetMRMLSceneInternal(vtkMRMLScene* newScene) override;
107  void SetViewNode(vtkMRMLViewNode* newViewNode);
108  void SetCameraNode(vtkMRMLCameraNode* newCameraNode);
109 
110  void OnMRMLSceneNodeAdded(vtkMRMLNode* node) override;
111  void OnMRMLSceneNodeRemoved(vtkMRMLNode* node) override;
112  void UpdateFromMRMLScene() override;
113 
114  void UpdateMRMLNodes();
115 
116  // View and camera nodes are looked up from the scene based on the layout name.
117  std::string Name;
118 
122 
123 private:
124  vtkMRMLViewLogic(const vtkMRMLViewLogic&) = delete;
125  void operator=(const vtkMRMLViewLogic&) = delete;
126 
127 };
128 
129 #endif
Superclass for MRML logic classes.
void PrintSelf(ostream &os, vtkIndent indent) override
MRML node to represent a display property of 3D surface model.
MRML node to represent a 3D surface model.
vtkMRMLViewNode * ViewNode
MRML node for representing a linear transformation.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *)
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
MRML node for representing a volume (image stack).
Slicer logic class for view manipulation.
MRML node to represent a 3D view.
MRML node to represent camera node.
vtkMRMLCameraNode * CameraNode
Abstract class that contains graphical display properties for displayable nodes.
virtual void UpdateFromMRMLScene()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
static vtkMRMLAbstractLogic * New()