Computer Assited Medical Intervention Tool Kit  version 5.0
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-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, 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 
50  static vtkInteractorStylePick* New();
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
camitk::vtkInteractorStylePick::Pick
virtual void Pick()
Definition: vtkInteractorStylePick.cpp:247
camitk::vtkInteractorStylePick::endPosition
int endPosition[2]
Definition: vtkInteractorStylePick.h:73
camitk::vtkInteractorStylePick::areaPicking
bool areaPicking
Definition: vtkInteractorStylePick.h:79
CamiTKAPI.h
camitk::vtkInteractorStylePick::startPosition
int startPosition[2]
Definition: vtkInteractorStylePick.h:72
camitk::vtkStandardNewMacro
vtkStandardNewMacro(vtkInteractorStylePick)
camitk::vtkInteractorStylePick::OnLeftButtonDown
void OnLeftButtonDown() override
Definition: vtkInteractorStylePick.cpp:88
camitk::vtkInteractorStylePick::pixelArray
vtkSmartPointer< vtkUnsignedCharArray > pixelArray
Definition: vtkInteractorStylePick.h:77
camitk::vtkInteractorStylePick::vtkInteractorStylePick
vtkInteractorStylePick()
Definition: vtkInteractorStylePick.cpp:74
camitk::vtkInteractorStylePick::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Definition: vtkInteractorStylePick.cpp:329
camitk::vtkInteractorStylePick::moving
int moving
Definition: vtkInteractorStylePick.h:75
camitk::vtkInstantiatorNewMacro
vtkInstantiatorNewMacro(vtkInteractorStylePick)
vtkInteractorStylePick.h
camitk::vtkInteractorStylePick::RedrawRubberBand
void RedrawRubberBand()
Definition: vtkInteractorStylePick.cpp:176
camitk::vtkInteractorStylePick::OnMouseMove
void OnMouseMove() override
Definition: vtkInteractorStylePick.cpp:125
camitk::vtkInteractorStylePick::OnLeftButtonUp
void OnLeftButtonUp() override
Definition: vtkInteractorStylePick.cpp:160
camitk::vtkInteractorStylePick
Specific backward compatible interactor for CamiTK RendererWidget Interactor used when we are in pick...
Definition: vtkInteractorStylePick.h:46
camitk::vtkInteractorStylePick::SetAreaPicking
void SetAreaPicking(bool b)
Definition: vtkInteractorStylePick.cpp:83
CAMITK_API
#define CAMITK_API
Definition: CamiTKAPI.h:49
camitk
Definition: Action.cpp:35