2 #ifndef __ContourExtractData_h_INCLUDED_H__
3 #define __ContourExtractData_h_INCLUDED_H__
6 #include "manualContourModel.h"
10 //--------------------------------------------------------------------------
11 class creaMaracasVisu_EXPORT ContourExtractData
14 ContourExtractData(bool imagesResults=false);
15 ~ContourExtractData();
17 //----------------------------------------------------------------------
18 void SetImage( vtkImageData* imagedata);
19 void SetZtoBeAnalys( int z );
21 void SetLstManualContourModel( std::vector<manualBaseModel*> lstManConMod);
22 void GetValuesInsideCrown( std::vector<double> *pLstValue,
23 std::vector<double> *pLstValuePosX,
24 std::vector<double> *pLstValuePosY,
25 std::vector<double> *pLstValuePosZ);
27 void CalculateImageResult();
28 vtkImageData *GetVtkImageValueResult();
29 vtkImageData *GetVtkImageMaskResult();
30 void Statistics( std::vector<double> *inputLstValue,
38 double *rstandardeviation);
39 void SetTypeOperation(int type);
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);
47 void ResetImageResult(int z);
48 void InitLstContoursLinesYPoints();
49 bool isInside(int x, int y, int typeOperation );
52 // Asigns the sizeImageY.
53 // @param pSizeImageY - int
54 void SetSizeImageY(int pSizeImageY);
60 // List of contours to obtain the respective statistics.
62 std::vector<manualBaseModel*> lstManConMod;
65 // Operation Type (AND,OR,XOR...)
70 vtkImageData *imagedata;
71 vtkImageData *imagedataValueResult;
72 vtkImageData *imagedataMaskResult;
78 // Asigns the minimum and maximum points of the contour model in parameter.
79 // @param *minPoint - int
80 // @param *maxPoint - int
81 // @param *manualcontourmodel - manualBaseModel
83 void GetMinMaxPoint(int *minPoint,
85 manualBaseModel *manualcontourmodel );
87 // Obtain the minimum and maximum point among the contours. The value is saved in the parameter
89 // @param *minPoint - int pointer to the minPoint
90 // @param *maxPoint - int pointer to the maxPoint
92 void GetMinMaxPoint_Of_LstManConMod( int *minPoint,
95 int AnalisisContourInsideV2(int x, int y, int iContour );
97 double GetDataValue(int x, int y, int z);
98 void PutVtkImageDataResultValue( int x, int y,int z, double value );
99 void InitVtkImagesResult();
101 //--Volume Statistics--
106 double vol_acum_average;
107 double vol_acum_standardeviation;
108 void SetVolumeStatistics(int rCountRange, int rsize,
109 double minValue,double maxValue,
110 double acum_average, double acum_standardeviation);
113 // List of contours , list of linesY, list of points over the line
114 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX1;
115 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY1;
116 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX2;
117 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY2;
118 void Fill_lstlstlstVecXY(int iContour, int sizeY);
125 #endif // __ContourExtractData_h_INCLUDED_H__