]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.h
no message
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / ContourExtractData.h
1
2 #ifndef __ContourExtractData_h_INCLUDED_H__
3 #define __ContourExtractData_h_INCLUDED_H__
4
5
6 #include "manualContourModel.h"
7 #include "marTypes.h"
8
9
10   //--------------------------------------------------------------------------
11   class creaMaracasVisu_EXPORT ContourExtractData 
12   {
13   public:
14         ContourExtractData(bool imagesResults=false);
15     ~ContourExtractData();
16
17 //----------------------------------------------------------------------
18         void SetImage( vtkImageData* imagedata);
19         void SetZtoBeAnalys( int z );
20
21         void SetLstManualContourModel( std::vector<manualContourModel*> lstManConMod);
22         void GetValuesInsideCrown(      std::vector<double> *pLstValue,
23                                                                 std::vector<double> *pLstValuePosX,
24                                                                 std::vector<double> *pLstValuePosY,
25                                                                 std::vector<double> *pLstValuePosZ);
26
27         void CalculateImageResult();
28         vtkImageData *GetVtkImageValueResult();
29         vtkImageData *GetVtkImageMaskResult();
30         void Statistics( std::vector<double> *inputLstValue, 
31                                         int     grayRangeMin,
32                                         int     grayRangeMax,
33                                         int             *rCountRange, 
34                                         int             *rsize, 
35                                         double  *rmin, 
36                                         double  *rmax,
37                                         double  *raverage,
38                                         double  *rstandardeviation);
39         void SetTypeOperation(int type);
40
41           //--Volume Statistics--
42           void InitVolumeStatistics();
43           void GetVolumeStatistics(int *vol_rCountRange, int *vol_rsize,
44                                                                 double *vol_minValue, double *vol_maxValue,
45                                                                 double *vol_average, double *vol_standardeviation);
46           
47           
48           
49   private:
50         bool                                                            okImagesResults;
51         std::vector<manualContourModel*>        lstManConMod;
52         int                                                                     _typeOperation;
53
54         int                                                                     zImage;
55         vtkImageData                                            *imagedata;
56         vtkImageData                                            *imagedataValueResult;
57         vtkImageData                                            *imagedataMaskResult;
58
59         bool isInside(int x, int y, int typeOperation );
60         void GetMinMaxPoint(int *minPoint, 
61                                                 int *maxPoint, 
62                                                 manualContourModel *manualcontourmodel );
63         void GetMinMaxPoint_Of_LstManConMod(    int *minPoint, 
64                                                                                         int *maxPoint);
65
66         int AnalisisContourInside(      int x, 
67                                                                 int y, 
68                                                                 manualContourModel *manualcontourmodel );
69         double GetDataValue(int x, int y, int z);
70         void ResetImageResult(int z);
71         void PutVtkImageDataResultValue( int x, int y,int z, double value );
72         void InitVtkImagesResult();
73
74
75           //--Volume Statistics--
76           int           vol_rCountRange;
77           int           vol_rsize;
78           double        vol_minValue;
79           double        vol_maxValue;
80           double        vol_acum_average;
81           double        vol_acum_standardeviation;
82           void SetVolumeStatistics(int rCountRange, int rsize,
83                                                            double minValue,double maxValue,
84                                                            double acum_average, double acum_standardeviation);
85           
86   };
87
88
89 #endif  // __ContourExtractData_h_INCLUDED_H__
90