/* #ifndef __pHistogram_h__ #define __pHistogram_h__ // -------------------------------------------------------------------------------------------- // WX headers inclusion. // For compilers that support precompilation, includes . // -------------------------------------------------------------------------------------------- #include #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include #endif */ //-------------------------------------------------------------------------------------------- // Includes //-------------------------------------------------------------------------------------------- //--------------------- // VTK //--------------------- #include "vtkImageData.h" #include "vtkMetaImageReader.h" //----------------- // C++ //----------------- #include #include #include //-------------------------------------------------------------------------------------------- // Class definition //-------------------------------------------------------------------------------------------- class pHistogram //:public wxObject { //---------------------------------------------------------------------------------------- // Methods definition //---------------------------------------------------------------------------------------- public: /* Constructor */ pHistogram(std::string filePath); /* Constructor */ pHistogram(vtkImageData* imageData); ~pHistogram(); /* @param filePath: is the path where the image is */ void setImagePath(std::string filePath); /* Return the points of the histogram of the image */ std::vector getPoints(); /* Calculate the histogram and save it in the attribute points it is used if the user had given the file's path */ //private: void buildHistogram(); /* Calculate the histogram and save it in the attribute points it is used if the user had given the imageData */ void buildHistogram(vtkImageData* imageData); /* getting ready the points */ void initializePoints(int xDimension); /* constructing the histogram */ void setPoints(vtkImageData* imageData); /* Returns the poins of the histograms */ vtkImageData* getHistogram(); /* hash por getting the index for the histogram vector of the original image */ int getIndex(int gValue); /* Setting the size */ void setSize(int nSize); /* Get Image Size */ int getImageSize(); /* Get Size of the histogram */ int getSize(); /* Get the maximum value of grey of the histogram */ int getMaximumLevelOfGrey(); /* Get the minimum value of grey of the histogram */ int getMinimumLevelOfGrey(); /* get a point of the Histogram given the grey value */ int getHistogramPoint(int gValue); //---------------------------------------------------------------------------------------- // Attributes declaration //---------------------------------------------------------------------------------------- private: /* Points of the histogram of the image */ vtkImageData* points; /* The path of the image */ std::string path; /* the size of histogram vector */ int size; /* Maximum Level of grey */ int maxLevelOfGrey; /* Minimum Level of grey */ int minLevelOfGrey; /* image size */ int sizeImage; //DECLARE_CLASS (pHistogram) }; //#endif