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