1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifndef __ContourCrownWidget_h_INCLUDED_H__
27 #define __ContourCrownWidget_h_INCLUDED_H__
30 #include "manualContourControler.h"
31 #include "manualContourModel.h"
32 #include "manualViewContour.h"
33 #include "manualRoiControler.h"
34 #include "manualViewRoi.h"
35 #include "mBarRange.h"
37 //JSTG_14-06-08--------------------
38 #include "ContourPropagation.h"
39 //---------------------------------
43 //--------------------------------------------------------------------------
44 class creaMaracasVisu_EXPORT wxMaracasCoutourTool : public wxPanel
47 wxMaracasCoutourTool( wxWindow *parent);
48 ~wxMaracasCoutourTool();
49 void OnContourA(wxCommandEvent &event);
50 void OnContourB(wxCommandEvent &event);
51 void OnContourAB(wxCommandEvent &event);
53 void Init(wxVtkBaseView *wxvtkbaseview, vtkImageData* imagedata);
56 void GetValuesInsideCrown( std::vector<double> *pLstValue,
57 std::vector<double> *pLstValuePosX,
58 std::vector<double> *pLstValuePosY,
59 std::vector<double> *pLstValuePosZ);
61 wxVtkBaseView *GetWxVtkBaseView();
62 //EED void ProcessOutputs();
63 vtkImageData *GetVtkImageValueResult();
64 vtkImageData *GetVtkImageMaskResult();
66 //JSTG 26-02-08 --------------------------------------------------------------------------------------------
67 void GetSplinePoints ( std::vector<double> *pLstContourX,
68 std::vector<double> *pLstContourY,
69 std::vector<double> *pLstContourZ );
71 void SetControlPoints ( std::vector<double> *InVectorX,
72 std::vector<double> *InVectorY,
73 std::vector<double> *InVectorZ );
74 //JSTG 21-03-08 ----------------------------------------------
75 void OnSaveContour ( wxCommandEvent &event );
76 void OnSaveControlPoints( wxCommandEvent &event );
77 //JSTG 11-04-08 ----------------------------------------------
78 void EreaseLastContour ( wxCommandEvent& event );
79 void EreaseLastCP ( wxCommandEvent& event );
80 //----------------------------------------------------------------------------------------------------------
84 //EED ContourCrown *mbbtkContourCrown;
85 vtkImageData *imagedata;
86 vtkImageData *imagedataValueResult;
87 vtkImageData *imagedataMaskResult;
88 wxVtkBaseView *wxvtkbaseview;
90 //JSTG 26-02-08 ------------------------------------------
91 std::vector<double> _tempCX;
92 std::vector<double> _tempCY;
93 std::vector<int> _tempCZ;
94 std::vector<int> _SizesC;
95 std::vector<double> _tempCPX;
96 std::vector<double> _tempCPY;
97 std::vector<int> _tempCPZ;
98 std::vector<int> _SizesCP;
99 std::vector<double> *pControlVectorX;
100 std::vector<double> *pControlVectorY;
101 std::vector<double> *pControlVectorZ;
103 manualPoint *_mpoint;
104 //--------------------------------------------------------
105 //JSTG_14-06-08-------------------------------------------
106 ContourPropagation *_contprop;
107 //--------------------------------------------------------
109 manualContourControler *_manContourControl_1;
110 manualContourModel *_mContourModel_1;
111 manualViewContour *_mViewContour_1;
113 manualContourControler *_manContourControl_2;
114 manualContourModel *_mContourModel_2;
115 manualViewContour *_mViewContour_2;
117 manualRoiControler *_manRoiControl;
118 manualContourModel *_mContourModel;
119 manualViewRoi *_mViewRoi;
122 bool isInside(int x, int y);
123 void GetMinMaxPoint(int *minPoint, int *maxPoint);
124 void GetMinMaxPoint(int *minPoint,
126 manualViewBaseContour *manualviewbaseecontour,
127 manualContourModel *manualcontourmodel );
128 int AnalisisContourInside( int x,
130 manualViewBaseContour *manualviewbaseecontour,
131 manualContourModel *manualcontourmodel );
132 double GetDataValue(int x, int y);
133 void ResetImageResult();
134 void PutVtkImageDataResultValue( int x, int y, double value );
135 void InitVtkImagesResult();
141 #endif // __ContourCrownWidget_h_INCLUDED_H__