]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourPropagation.h
5895fa95f7ba059cb758056c95de2bdc1651ed50
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / ContourPropagation.h
1 #ifndef __ContourPropagation_h_INCLUDED__
2 #define __ContourPropagation_h_INCLUDED__
3
4 #include "Propagation.h"
5 #include "ExtractControlPoints2D.h"
6 #include "vtkImageData.h"
7 #include "vectorFunctions.h"
8 #include "marTypes.h"
9
10 class creaMaracasVisu_EXPORT ContourPropagation 
11 {
12         public:
13                 ContourPropagation();
14                 ~ContourPropagation();
15                 void resetAppend                                ( );
16                 void appendContour                              ( std::vector<double>*InX, 
17                                                                                   std::vector<double>*InY, 
18                                                                                   std::vector<double>*InZ );
19                 void GetContour                                 ( int id, std::vector<double>*vecX, 
20                                                                                                   std::vector<double>*vecY, 
21                                                                                                   std::vector<double>*vecZ );
22                 //AUTOMATIC METHOD
23                 void GetInitialControlPoints    ( int id, std::vector<double>*vecX, 
24                                                                                                   std::vector<double>*vecY, 
25                                                                                                   std::vector<double>*vecZ);
26                 void GetControlPoints                   ( int id, std::vector<double>*vecX, 
27                                                                                                   std::vector<double>*vecY, 
28                                                                                                   std::vector<double>*vecZ );
29
30                 //SAMPLING METHOD
31                 void CalculeSplinePropagation();
32                 void GetControlPoints                   ( int id, double samp,
33                                                                                   std::vector<double>*vecX, 
34                                                                                   std::vector<double>*vecY, 
35                                                                                   std::vector<double>*vecZ );
36
37                 int  FindIdWithZ                                ( double z);
38
39
40                 void getMaxMinZ                                 ( double *minz, double *maxz);
41                 void setInterpolationNumber             ( int num );
42
43
44         //TEST CLASSES FOR BBTK
45                 void appendContour                              ( );
46                 vtkImageData* GetKeyContours    ( std::vector<double>*vecX, 
47                                                                                   std::vector<double>*vecY, 
48                                                                                   std::vector<double>*vecZ, 
49                                                                                   std::vector<int>*vecS );
50
51                 bool ifSliceKeyContourExist(int slice);
52
53
54         private:
55                 bool mustOrderAppend( );
56                 void orderAppend( );
57                 void OrdenarSliceKeyContourVec();
58                 
59
60                 PropContour                                     *_propc;
61                 AutoControlPoints                       *_autoc;
62                 ExtractControlPoints2D          *_ext2D;
63
64                 std::vector<double>                     _InX;
65                 std::vector<double>                     _InY;
66                 std::vector<double>                     _InZ;
67                 std::vector<int>                        _InS;
68                 std::vector<int>                        _sliceKeyContourVec;
69
70                 std::vector<Vector>                     _planevector;
71 };
72
73 #endif //__ContourPropagation_h_INCLUDED__
74  
75