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( int *numberOfPixels,
23 std::vector<double> *pLstValue,
24 std::vector<double> *pLstValuePosX,
25 std::vector<double> *pLstValuePosY,
26 std::vector<double> *pLstValuePosZ);
28 void CalculateImageResult();
29 vtkImageData *GetVtkImageValueResult();
30 vtkImageData *GetVtkImageMaskResult();
31 void Statistics( std::vector<double> *inputLstValue,
39 double *rstandardeviation);
40 void SetTypeOperation(int type);
42 //--Volume Statistics--
43 void InitVolumeStatistics();
44 void GetVolumeStatistics(int *vol_rCountRange, int *vol_rsize,
45 double *vol_minValue, double *vol_maxValue,
46 double *vol_average, double *vol_standardeviation);
48 void ResetImageResult(int z);
49 void SetScalarRange(double min, double max);
50 void InitLstContoursLinesYPoints();
51 bool isInside(int x, int y, int typeOperation );
54 // Asigns the sizeImageY.
55 // @param pSizeImageY - int
56 void SetSizeImageY(int pSizeImageY);
59 double scalarRange[2];
63 // List of contours to obtain the respective statistics.
65 std::vector<manualBaseModel*> lstManConMod;
68 // Operation Type (AND,OR,XOR...)
73 vtkImageData *imagedata;
74 vtkImageData *imagedataValueResult;
75 vtkImageData *imagedataMaskResult;
81 // Asigns the minimum and maximum points of the contour model in parameter.
82 // @param *minPoint - int
83 // @param *maxPoint - int
84 // @param *manualcontourmodel - manualBaseModel
86 void GetMinMaxPoint(int *minPoint,
88 manualBaseModel *manualcontourmodel );
90 // Obtain the minimum and maximum point among the contours. The value is saved in the parameter
92 // @param *minPoint - int pointer to the minPoint
93 // @param *maxPoint - int pointer to the maxPoint
95 void GetMinMaxPoint_Of_LstManConMod( int *minPoint,
98 int AnalisisContourInsideV2(int x, int y, int iContour );
100 double GetDataValue(int x, int y, int z);
101 void PutVtkImageDataResultValue( int x, int y,int z, double value );
102 void InitVtkImagesResult();
104 //--Volume Statistics--
109 double vol_acum_average;
110 double vol_acum_standardeviation;
111 void SetVolumeStatistics(int rCountRange, int rsize,
112 double minValue,double maxValue,
113 double acum_average, double acum_standardeviation);
116 // List of contours , list of linesY, list of points over the line
117 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX1;
118 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY1;
119 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX2;
120 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY2;
121 void Fill_lstlstlstVecXY(int iContour, int sizeY);
128 #endif // __ContourExtractData_h_INCLUDED_H__