]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.h
e09ae229136c338c5eba5289c0efb7ddea7f0f39
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / ContourCrownWidget.h
1 #ifndef __ContourCrownWidget_h_INCLUDED_H__
2 #define __ContourCrownWidget_h_INCLUDED_H__
3
4 #include "marTypes.h"
5 #include "manualContourControler.h"
6 #include "manualContourModel.h"
7 #include "manualViewContour.h"
8 #include "manualRoiControler.h"
9 #include "manualViewRoi.h"
10 #include "mBarRange.h"
11
12 //JSTG_14-06-08--------------------
13 #include "ContourPropagation.h"
14 //---------------------------------
15   
16
17
18   //--------------------------------------------------------------------------
19   class creaMaracasVisu_EXPORT wxMaracasCoutourTool : public wxPanel
20   {
21   public:
22         wxMaracasCoutourTool( wxWindow *parent);
23     ~wxMaracasCoutourTool();
24         void OnContourA(wxCommandEvent &event);   
25         void OnContourB(wxCommandEvent &event);   
26         void OnContourAB(wxCommandEvent &event);   
27
28           void Init(wxVtkBaseView *wxvtkbaseview, vtkImageData* imagedata);
29           void ConfigureVTK();
30
31         void GetValuesInsideCrown(      std::vector<double> *pLstValue,
32                                                                 std::vector<double> *pLstValuePosX,
33                                                                 std::vector<double> *pLstValuePosY,
34                                                                 std::vector<double> *pLstValuePosZ);
35
36         wxVtkBaseView *GetWxVtkBaseView();
37 //EED   void ProcessOutputs();
38         vtkImageData *GetVtkImageValueResult();
39         vtkImageData *GetVtkImageMaskResult();
40
41 //JSTG 26-02-08 --------------------------------------------------------------------------------------------
42         void GetSplinePoints    (       std::vector<double> *pLstContourX,
43                                                                 std::vector<double> *pLstContourY,
44                                                                 std::vector<double> *pLstContourZ  );
45
46         void SetControlPoints   (       std::vector<double> *InVectorX,
47                                                                 std::vector<double> *InVectorY, 
48                                                                 std::vector<double> *InVectorZ );
49 //JSTG 21-03-08 ----------------------------------------------
50         void OnSaveContour              ( wxCommandEvent &event );
51         void OnSaveControlPoints( wxCommandEvent &event );
52 //JSTG 11-04-08 ----------------------------------------------
53     void EreaseLastContour      ( wxCommandEvent& event );
54         void EreaseLastCP               ( wxCommandEvent& event );
55 //----------------------------------------------------------------------------------------------------------
56
57   private:
58         mBarRange               *mbarrange;
59 //EED   ContourCrown    *mbbtkContourCrown;
60         vtkImageData    *imagedata;
61         vtkImageData    *imagedataValueResult;
62         vtkImageData    *imagedataMaskResult;
63         wxVtkBaseView   *wxvtkbaseview;
64
65 //JSTG 26-02-08 ------------------------------------------
66         std::vector<double>             _tempCX;
67         std::vector<double>             _tempCY;
68         std::vector<int>                _tempCZ;
69         std::vector<int>                _SizesC;
70         std::vector<double>             _tempCPX;
71         std::vector<double>             _tempCPY;
72         std::vector<int>                _tempCPZ;
73         std::vector<int>                _SizesCP;
74         std::vector<double>             *pControlVectorX;
75         std::vector<double>             *pControlVectorY;
76         std::vector<double>             *pControlVectorZ;
77         int _zz;
78         manualPoint                             *_mpoint;
79 //--------------------------------------------------------
80 //JSTG_14-06-08-------------------------------------------
81         ContourPropagation              *_contprop;
82 //--------------------------------------------------------
83
84         manualContourControler  *_manContourControl_1;
85         manualContourModel              *_mContourModel_1;
86         manualViewContour               *_mViewContour_1;
87
88         manualContourControler  *_manContourControl_2;
89         manualContourModel              *_mContourModel_2;
90         manualViewContour               *_mViewContour_2;
91
92         manualRoiControler              *_manRoiControl;
93         manualContourModel              *_mContourModel;
94         manualViewRoi                   *_mViewRoi;
95
96
97         bool isInside(int x, int y);
98         void GetMinMaxPoint(int *minPoint, int *maxPoint);
99         void GetMinMaxPoint(int *minPoint, 
100                                                 int *maxPoint, 
101                                                 manualViewBaseContour *manualviewbaseecontour,
102                                                 manualContourModel *manualcontourmodel );
103         int AnalisisContourInside(      int x, 
104                                                                 int y, 
105                                                                 manualViewBaseContour *manualviewbaseecontour,
106                                                                 manualContourModel *manualcontourmodel );
107         double GetDataValue(int x, int y);
108         void ResetImageResult();
109         void PutVtkImageDataResultValue( int x, int y, double value );
110         void InitVtkImagesResult();
111
112
113   };
114
115
116 #endif  // __ContourCrownWidget_h_INCLUDED_H__
117