]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/CutModule/kernel/CutModelFigure.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / CutModule / kernel / CutModelFigure.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #ifndef CUTTINGMODELFIGURE_H_
27 #define CUTTINGMODELFIGURE_H_
28
29 #include "vtkTransform.h"
30 #include "vtkPolyData.h"
31
32 class CutModelFigure
33 {
34 public:
35         CutModelFigure(){}      
36         
37         virtual ~CutModelFigure(){}
38
39         virtual void SetPosition(double x,double y, double z){
40                 _px = x;
41                 _py = y;
42                 _pz = z;
43         }
44
45         virtual void    SetScale(double sx,double sy, double sz){
46                 _sx = sx;
47                 _sy = sy;
48                 _sz = sz;
49         }
50
51         virtual void    SetRotation(double alfa,double beta, double teta){
52         _alfa = alfa;
53                 _beta = beta;
54                 _teta = teta;
55         }
56
57         virtual void    SetSpacing(double spcX,double spcY, double spcZ){
58                 _spcX = spcX;
59                 _spcY = spcY;
60                 _spcZ = spcZ;
61         }               
62
63         virtual void SetVtkTransform(vtkTransform *transform){
64                 double *orient = transform->GetOrientation();
65                 _alfa = orient[0];
66                 _beta = orient[1];
67                 _teta = orient[2];
68
69                 double *scale = transform->GetScale();
70                 _sx = scale[0];
71                 _sy = scale[1];
72                 _sz = scale[2];
73
74                 double *position = transform->GetPosition();
75                 _px = position[0];
76                 _py = position[1];
77                 _pz = position[2];
78
79
80         }
81         virtual void SetInversVtkTransform(vtkTransform *inverstransform){
82                 _inversModel = inverstransform;
83         }
84
85         virtual bool IfPointInside(double x, double y, double z) = 0;
86         virtual double  GetTheoricVolume()=0;   
87         virtual vtkPolyData* getPolyData()=0;
88
89 private:
90         double                  _px;
91         double                  _py;
92         double                  _pz;
93         double                  _alfa;
94         double                  _beta;
95         double                  _teta;
96         double                  _spcX;
97         double                  _spcY;
98         double                  _spcZ;
99         char *GetName;
100 protected:
101         double                  _sx;
102         double                  _sy;
103         double                  _sz;
104         vtkTransform    *_inversModel;
105         vtkTransform    *_matrixModel;  
106 };
107
108 #endif /*FIGURECUTTINGMODEL_H_*/