]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/Histogram.h
576da9987ff9dce2840da6f4db37b4bce6acaed0
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / Histogram.h
1
2
3 #ifndef __HISTOGRAMW1__
4 #define __HISTOGRAMW1__
5
6
7 // ----------------------------------------------------------------------------
8 // wx headers inclusion.
9 // For compilers that support precompilation, includes <wx/wx.h>.
10 // ----------------------------------------------------------------------------
11 #include <wx/wxprec.h>
12 #ifdef __BORLANDC__
13 #pragma hdrstop
14 #endif
15 #ifndef WX_PRECOMP
16 #include <wx/wx.h>
17 #endif
18
19 #include "marTypes.h"
20 #include "pPlotterWindow.h"
21 #include "pFunctionPoint.h"
22 #include  "vtkImageData.h"
23 #include "pHistogram.h"
24 #include "pPlotterScaleY.h"
25 #include "pPlotterScaleX.h"
26
27 //#define MAX 500
28 #define NUM_POINTS 100
29 #define WINDOW_SIZE 10
30
31 class creaMaracasVisu_EXPORT Histogram:public wxPanel
32 {
33 public:
34         //---------------------
35         // Constructor
36         //----------------------
37
38         //HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag );
39         
40  
41         Histogram( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag,vtkImageData* imageData);
42         
43         ~Histogram();
44
45         /*
46         Draw the histogram in the plotter
47         */
48         void drawHistogram();
49         /*
50                 if the user resize the window   
51         */
52         void OnSize( wxSizeEvent &WXUNUSED(event) );
53         //---------------------------------------
54         // Get Information from the widget
55         //---------------------------------------
56         
57         /*
58                 get a point of the Histogram
59                 given the grey value
60         */
61         int getHistogramPoint(int gValue);
62         int getHistogramSize();
63         
64         
65 private:
66         
67          pHistogram*            histogram;
68          pPlotterWindow*        plotter;
69          int                            histogramSize;
70          int                             idHistogram;
71          
72          
73          DECLARE_CLASS(Histogram);
74          //----------------------------------------------------------------------------
75         // wxWidget macro use declaration for handdling events
76         //----------------------------------------------------------------------------
77         DECLARE_EVENT_TABLE()
78         
79 };
80 #endif
81
82