2 #ifndef __pHistogram_h__
3 #define __pHistogram_h__
5 // --------------------------------------------------------------------------------------------
6 // WX headers inclusion.
7 // For compilers that support precompilation, includes <wx/wx.h>.
8 // --------------------------------------------------------------------------------------------
10 #include <wx/wxprec.h>
19 //--------------------------------------------------------------------------------------------
21 //--------------------------------------------------------------------------------------------
23 //---------------------
25 //---------------------
27 #include "vtkImageData.h"
28 #include "vtkMetaImageReader.h"
37 //--------------------------------------------------------------------------------------------
39 //--------------------------------------------------------------------------------------------
41 class pHistogram //:public wxObject
44 //----------------------------------------------------------------------------------------
46 //----------------------------------------------------------------------------------------
52 pHistogram(std::string filePath);
56 pHistogram(vtkImageData* imageData);
59 @param filePath: is the path where the image is
61 void setImagePath(std::string filePath);
63 Return the points of the histogram of the image
65 std::vector <int> getPoints();
67 Calculate the histogram and save it in the attribute points
68 it is used if the user had given the file's path
71 void buildHistogram();
73 Calculate the histogram and save it in the attribute points
74 it is used if the user had given the imageData
76 void buildHistogram(vtkImageData* imageData);
78 getting ready the points
80 void initializePoints(int xDimension);
82 constructing the histogram
84 void setPoints(vtkImageData* imageData);
86 Returns the poins of the histograms
88 vtkImageData* getHistogram();
90 hash por getting the index for the histogram vector of the original
93 int getIndex(int gValue);
97 void setSize(int nSize);
103 Get Size of the histogram
107 Get the maximum value of grey of the histogram
109 int getMaximumLevelOfGrey();
111 Get the minimum value of grey of the histogram
113 int getMinimumLevelOfGrey();
115 get a point of the Histogram
118 int getHistogramPoint(int gValue);
121 //----------------------------------------------------------------------------------------
122 // Attributes declaration
123 //----------------------------------------------------------------------------------------
126 Points of the histogram of
129 vtkImageData* points;
131 The path of the image
135 the size of histogram vector
139 Maximum Level of grey
143 Minimum Level of grey
151 //DECLARE_CLASS (pHistogram)