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