Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PlaneC.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2013 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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 #ifndef PLANE_C_H
26 #define PLANE_C_H
27 
28 // -- VTK stuff
29 #include <vtkSmartPointer.h>
30 
31 // -- VTK stuff classes
32 class vtkPlaneSource;
33 class vtkPolyDataMapper;
34 class vtkActor;
35 class vtkProperty;
36 
37 
38 namespace camitk
39 {
48 class PlaneC
49 {
50  public:
52  enum PlaneCType {
60  };
62  PlaneC();
64  ~PlaneC();
65 
71  void init(PlaneCType type, double bounds[6]);
73  void setVisuPlane();
75  void setVisuActivePlane();
77  void setVisuActivePlaneOff();
79  void clear();
81  void translatePlaneX();
83  void translatePlaneY();
85  void translatePlaneZ();
87  void rotationAxe1();
89  void rotationAxe2();
91  vtkSmartPointer<vtkActor> getActor();
92 
94  void setTransfoPercentToRealValue(double tab[3], double, double);
96  void setTranslationMaxInPercent(double);
98  void getTransformationInPercent(double*, double*, double*);
100  void setOrigin(double, double, double);
104  void setXAxisPoint(double, double, double);
108  void setYAxisPoint(double, double, double);
110  void getOrigin(double tab[3]);
112  void getNormal(double tab[3]);
113 
114 
115 
116  private:
117  vtkSmartPointer<vtkPlaneSource> plane;
118  vtkSmartPointer<vtkPolyDataMapper> planeMapper;
119  vtkSmartPointer<vtkActor> planeActor;
120  vtkSmartPointer<vtkProperty> aProp;
121 
123  double transfor[3];
125  double translat;
127  double angle1;
128  double angle2;
129  double translation1;
130 
131 };
132 
133 }
134 
135 #endif