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