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);
54 // List of contours to obtain the respective statistics.
56 std::vector<manualBaseModel*> lstManConMod;
59 // Operation Type (AND,OR,XOR...)
64 vtkImageData *imagedata;
65 vtkImageData *imagedataValueResult;
66 vtkImageData *imagedataMaskResult;
68 bool isInside(int x, int y, int typeOperation );
71 // Asigns the minimum and maximum points of the contour model in parameter.
72 // @param *minPoint - int
73 // @param *maxPoint - int
74 // @param *manualcontourmodel - manualBaseModel
76 void GetMinMaxPoint(int *minPoint,
78 manualBaseModel *manualcontourmodel );
80 // Obtain the minimum and maximum point among the contours. The value is saved in the parameter
82 // @param *minPoint - int pointer to the minPoint
83 // @param *maxPoint - int pointer to the maxPoint
85 void GetMinMaxPoint_Of_LstManConMod( int *minPoint,
88 int AnalisisContourInsideV2(int x, int y, int iContour );
90 double GetDataValue(int x, int y, int z);
91 void PutVtkImageDataResultValue( int x, int y,int z, double value );
92 void InitVtkImagesResult();
94 //--Volume Statistics--
99 double vol_acum_average;
100 double vol_acum_standardeviation;
101 void SetVolumeStatistics(int rCountRange, int rsize,
102 double minValue,double maxValue,
103 double acum_average, double acum_standardeviation);
106 // List of contours , list of linesY, list of points over the line
107 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX1;
108 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY1;
109 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX2;
110 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY2;
111 void Fill_lstlstlstVecXY(int iContour, int sizeY);
112 void InitLstContoursLinesYPoints();
117 #endif // __ContourExtractData_h_INCLUDED_H__