X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Graph2D%2FINC%2Fmodel%2FHistogram.h;fp=WCudaMSE%2FAPI_Bilat_Graph2D%2FINC%2Fmodel%2FHistogram.h;h=0f3a921fa5194e6998c70fd9aa89ccfbf2e4f9d8;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Graph2D/INC/model/Histogram.h b/WCudaMSE/API_Bilat_Graph2D/INC/model/Histogram.h new file mode 100755 index 0000000..0f3a921 --- /dev/null +++ b/WCudaMSE/API_Bilat_Graph2D/INC/model/Histogram.h @@ -0,0 +1,58 @@ +#ifndef HISTOGRAM_H_ +#define HISTOGRAM_H_ + +#include "Polylines.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class CBI_GRAPH Histogram: public Polylines + { + public: + /** + * Create an histogram with nbrSep+1 bins + * @param nbrSep the number of separation. + */ + Histogram(Title title, Apparance apparance, shared_array tabvalues, int nbValue,Interval intervalX, int nbrSep); + virtual ~Histogram(); + + void setValue(shared_array tabvalues, int nbValue); + + static int computeNbPoint(int nbrSep); + + void minMaxValues(Interval& minMax); + void setIntervalGraphX(Interval intervalX); + + protected: + /** + * Compute the histogram + */ + void computeHistogram(); + + + /** + * Create the histogram with the points. + */ + void computeFigure(); + + protected: + // Inputs + shared_array tabvalues; + int nbValue; + int nbrSep; + + // Tools + float* tabHistogram; + Interval intervalGraphX; + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/