]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/Contour/Propagation.h
virtual desctructors
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / Propagation.h
1 #ifndef __Propagation_h_INCLUDED__
2 #define __Propagation_h_INCLUDED__
3
4 #include "vtkImageData.h"
5
6 /* EED 03/07/2008
7   #include "itkMatrix.h"
8 */
9
10 #include "../manualContour.h"
11 #include "time.h"
12 #include <wx/wx.h>
13
14 class Vector
15 {
16         public:
17                         Vector  ();
18                         ~Vector ();
19             void        set_vec         ( double val );
20                         void    set_var         ( double val );
21                         double  get_vec         ( int id );
22                         double  get_var         ( );
23                         int             getsize_vec     ( );
24                         void    copyVector      ( std::vector<Vector>*vec1, std::vector<Vector>*vec2 ); 
25                         void    printVector     ( std::vector<Vector>*vec1 );
26                         void    set_x           ( double val );
27                         void    set_y           ( double val );
28                         void    set_z           ( double val );
29                         void    set_plane       ( int val );
30                         double  get_x           ( int id );
31                         int             getsize_x       ( );
32                         double  get_y           ( int id );
33                         int             getsize_y       ( );
34                         double  get_z           ( int id );
35                         int             getsize_z       ( );
36                         int             get_plane       ( );
37                         void    resetVec        ( );
38                         std::vector<double>     getVec();
39
40         private:
41                         double _var;
42                         int _plane;
43                         std::vector<double> _vec;
44                         std::vector<double> _vecX;
45                         std::vector<double> _vecY;
46                         std::vector<double> _vecZ;
47 };
48
49 class PropContour
50 {
51         public:
52                         PropContour();
53                         ~PropContour();
54
55 /* EED 03/07/2008
56                         vtkImageData*   method_RBF                                      ( double rad, std::vector<double>*CoordX, std::vector<double>*CoordY, 
57                                                                                                                   std::vector<double>*CoordZ );
58                         vtkImageData*   method_RBF_3D                           ( double rad, std::vector<double>*CoordX, std::vector<double>*CoordY, 
59                                                                                                                   std::vector<double>*CoordZ );
60                         vtkImageData*   method_RBF_3D_ThinPlate         ( double rad, std::vector<double>*CoordX, std::vector<double>*CoordY, 
61                                                                                                                   std::vector<double>*CoordZ );
62 */
63
64                         int                             VectorDirection                         ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ );
65                         void                    VectorOrder                                     ( int dir, int posinic, std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ);
66                         void                    ReadKeyContour                          ( FILE* fd );
67                         void                    ResetKeyContours                        ( );
68                         void                    SetKeyContours                          ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ );
69                         vtkImageData*   CalculeSplinePropagation        (  );  
70                         void                    GetKeyContours                          ( std::vector<double>*KeyX, std::vector<double>*KeyY, std::vector<double>*KeyZ, std::vector<int>*KeyS );
71                         void                    GetPropagatedContours           ( std::vector<Vector>*planevec );
72                         void                    GetIdContour                            ( int id, std::vector<double>*vecX, std::vector<double>*vecY, std::vector<double>*vecZ );
73                         void                    SetInterpNumber                         ( int val );
74                         int                             FindIdWithZ                                     ( double z );
75
76         private:
77
78 /* EED 03/07/2008
79                         double                  RBF_WendLand                            ( double norm, double m_rad );
80                         double                  RBF_ThinPlate                           ( double norm );
81                         double                  RBF_ThinPlate_3D                        ( double norm );
82 */
83
84                         void                    PreparePointsForSpline          ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ, std::vector<int>*Sizes );
85                         vtkImageData*   method_Spline                           ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ, std::vector<int>*Sizes );
86                         void                    ResetPlaneVector();
87                         
88                         int                                             _interpnumber;
89
90                         int                                             _dimImage[3];
91                         vtkImageData                    *imagedataValue;
92                         manualContourModel              *_mContourModel;
93
94                         std::vector<double>             _KeyContourX;
95                         std::vector<double>             _KeyContourY;
96                         std::vector<double>             _KeyContourZ;
97                         std::vector<int>                _KeyContourSizes;
98
99                         std::vector<Vector>             _planevector;
100 };
101 #endif // __Propagation_h_INCLUDED__
102  
103