Computer Assisted Medical Intervention Tool Kit  version 5.2
vtkInteractorStylePick.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2024 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 
27 #ifndef VTKINTERACTORSTYLEPICK_H
28 #define VTKINTERACTORSTYLEPICK_H
29 
30 #include "CamiTKAPI.h"
31 
32 // disable warning generated by clang about the surrounded headers
33 #include <CamiTKDisableWarnings>
34 #include <vtkInteractorStyle.h>
35 #include <CamiTKReEnableWarnings>
36 
37 #include <vtkSmartPointer.h>
38 
39 class vtkUnsignedCharArray;
40 
41 namespace camitk {
42 
46 class CAMITK_API vtkInteractorStylePick : public vtkInteractorStyle {
47 
48 public:
49 
51  vtkTypeMacro(vtkInteractorStylePick, vtkInteractorStyle);
52 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
55  void SetAreaPicking(bool b);
56 
57  void OnLeftButtonDown() override;
58 
59  void OnLeftButtonUp() override;
60 
61  void OnMouseMove() override;
62 
63 protected:
64 
66  ~vtkInteractorStylePick() override = default;
67 
68  virtual void Pick();
69 
70  void RedrawRubberBand();
71 
72  int startPosition[2];
73  int endPosition[2];
74 
75  int moving;
76 
77  vtkSmartPointer<vtkUnsignedCharArray> pixelArray;
78 
80 };
81 
82 }
83 
84 #endif //VTKINTERACTORSTYLEPICK_H
#define CAMITK_API
Definition: CamiTKAPI.h:49
Specific backward compatible interactor for CamiTK RendererWidget Interactor used when we are in pick...
Definition: vtkInteractorStylePick.h:46
static vtkInteractorStylePick * New()
bool areaPicking
Definition: vtkInteractorStylePick.h:79
vtkSmartPointer< vtkUnsignedCharArray > pixelArray
Definition: vtkInteractorStylePick.h:77
~vtkInteractorStylePick() override=default
vtkTypeMacro(vtkInteractorStylePick, vtkInteractorStyle)
int moving
Definition: vtkInteractorStylePick.h:75
Definition: Action.cpp:36