Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLThreeDViewInteractorStyle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkInteractorStyleTrackballCamera.h,v $
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or https://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef __vtkMRMLThreeDViewInteractorStyle_h
17 #define __vtkMRMLThreeDViewInteractorStyle_h
18 
19 #include "vtkMRMLDisplayableManagerExport.h"
20 
21 // MRML includes
22 #include "vtkMRMLCameraNode.h"
24 
25 // VTK includes
26 #include "vtkObject.h"
27 #include "vtkSmartPointer.h"
28 
29 class vtkCellPicker;
30 class vtkVolumePicker;
31 class vtkWorldPointPicker;
32 
51 class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLThreeDViewInteractorStyle :
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
62  void OnLeave() override;
63 
67  bool DelegateInteractionEventToDisplayableManagers(vtkEventData* inputEventData) override;
68 
71  vtkGetObjectMacro ( CameraNode, vtkMRMLCameraNode );
72  vtkSetObjectMacro ( CameraNode, vtkMRMLCameraNode );
73 
76  void SetInteractor(vtkRenderWindowInteractor *interactor) override;
77 
78 protected:
81 
82  bool QuickPick(int x, int y, double pickPoint[3]);
83 
85 
86  // For jump to slice feature (when mouse is moved while shift key is pressed)
87  // Slow but can pick anything (volumes and semi-transparent surfaces)
88  vtkSmartPointer<vtkCellPicker> AccuratePicker;
89  // Picker that uses Z buffer. Fast but ignores volumes and semi-transparent surfaces.
90  vtkSmartPointer<vtkWorldPointPicker> QuickPicker;
91  // Picker for volume-rendered images. Fast, as it only computes a single ray.
92  vtkSmartPointer<vtkVolumePicker> QuickVolumePicker;
93 
94 private:
96  void operator=(const vtkMRMLThreeDViewInteractorStyle&) = delete;
97 };
98 
99 #endif
vtkSmartPointer< vtkVolumePicker > QuickVolumePicker
void SetInteractor(vtkRenderWindowInteractor *interactor) override
Reimplemented to set additional observers
vtkSmartPointer< vtkWorldPointPicker > QuickPicker
void PrintSelf(ostream &os, vtkIndent indent) override
virtual bool DelegateInteractionEventToDisplayableManagers(unsigned long event)
Interactive manipulation of the camera.
Common base class for processing interaction events in MRML views.
static vtkMRMLViewInteractorStyle * New()
vtkSmartPointer< vtkCellPicker > AccuratePicker
MRML node to represent camera node.