ContourExtractData.h
Go to the documentation of this file.00001
00002 #ifndef __ContourExtractData_h_INCLUDED_H__
00003 #define __ContourExtractData_h_INCLUDED_H__
00004
00005
00006 #include "manualContourModel.h"
00007 #include "marTypes.h"
00008
00009
00010
00011 class creaMaracasVisu_EXPORT ContourExtractData
00012 {
00013 public:
00014 ContourExtractData(bool imagesResults=false);
00015 ~ContourExtractData();
00016
00017
00018 void SetImage( vtkImageData* imagedata);
00019 void SetZtoBeAnalys( int z );
00020
00021 void SetLstManualContourModel( std::vector<manualBaseModel*> lstManConMod);
00022 void GetValuesInsideCrown( int *numberOfPixels,
00023 std::vector<double> *pLstValue,
00024 std::vector<double> *pLstValuePosX,
00025 std::vector<double> *pLstValuePosY,
00026 std::vector<double> *pLstValuePosZ);
00027
00028 void CalculateImageResult();
00029 vtkImageData *GetVtkImageValueResult();
00030 vtkImageData *GetVtkImageMaskResult();
00031 void Statistics( std::vector<double> *inputLstValue,
00032 int grayRangeMin,
00033 int grayRangeMax,
00034 int *rCountRange,
00035 int *rsize,
00036 double *rmin,
00037 double *rmax,
00038 double *raverage,
00039 double *rstandardeviation);
00040 void SetTypeOperation(int type);
00041
00042
00043 void InitVolumeStatistics();
00044 void GetVolumeStatistics(int *vol_rCountRange, int *vol_rsize,
00045 double *vol_minValue, double *vol_maxValue,
00046 double *vol_average, double *vol_standardeviation);
00047
00048 void ResetImageResult(int z);
00049 void SetScalarRange(double min, double max);
00050 void InitLstContoursLinesYPoints();
00051 bool isInside(int x, int y, int typeOperation );
00052
00053
00054
00055
00056 void SetSizeImageY(int pSizeImageY);
00057
00058 private:
00059 double scalarRange[2];
00060 bool okImagesResults;
00061
00062
00063
00064
00065 std::vector<manualBaseModel*> lstManConMod;
00066
00067
00068
00069
00070 int _typeOperation;
00071
00072 int zImage;
00073 vtkImageData *imagedata;
00074 vtkImageData *imagedataValueResult;
00075 vtkImageData *imagedataMaskResult;
00076
00077
00078 int _sizeImageY;
00079
00080
00081
00082
00083
00084
00085
00086 void GetMinMaxPoint(int *minPoint,
00087 int *maxPoint,
00088 manualBaseModel *manualcontourmodel );
00089
00090
00091
00092
00093
00094
00095 void GetMinMaxPoint_Of_LstManConMod( int *minPoint,
00096 int *maxPoint);
00097
00098 int AnalisisContourInsideV2(int x, int y, int iContour );
00099
00100 double GetDataValue(int x, int y, int z);
00101 void PutVtkImageDataResultValue( int x, int y,int z, double value );
00102 void InitVtkImagesResult();
00103
00104
00105 int vol_rCountRange;
00106 int vol_rsize;
00107 double vol_minValue;
00108 double vol_maxValue;
00109 double vol_acum_average;
00110 double vol_acum_standardeviation;
00111 void SetVolumeStatistics(int rCountRange, int rsize,
00112 double minValue,double maxValue,
00113 double acum_average, double acum_standardeviation);
00114
00115
00116
00117 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX1;
00118 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY1;
00119 std::vector< std::vector< std::vector<double> > > _lstlstlstVecX2;
00120 std::vector< std::vector< std::vector<double> > > _lstlstlstVecY2;
00121 void Fill_lstlstlstVecXY(int iContour, int sizeY);
00122
00123
00124
00125 };
00126
00127
00128 #endif // __ContourExtractData_h_INCLUDED_H__
00129