]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/Histogram.h
5138dc65133f146a069f72f2ef70c86162b51b83
[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 "pPlotterWindow.h"
20 #include "pFunctionPoint.h"
21 #include  "vtkImageData.h"
22 #include "pHistogram.h"
23 #include "pPlotterScaleY.h"
24 #include "pPlotterScaleX.h"
25
26 #define MAX 500
27 #define NUM_POINTS 100
28 #define WINDOW_SIZE 10
29
30 class Histogram:public wxPanel
31 {
32 public:
33         //---------------------
34         // Constructor
35         //----------------------
36
37         //HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag );
38         
39  
40         Histogram( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag,vtkImageData* imageData);
41         
42         ~Histogram();
43
44         /*
45         Draw the histogram in the plotter
46         */
47         void drawHistogram();
48         /*
49                 if the user resize the window   
50         */
51         void OnSize( wxSizeEvent &WXUNUSED(event) );
52         //---------------------------------------
53         // Get Information from the widget
54         //---------------------------------------
55         
56         /*
57                 get a point of the Histogram
58                 given the grey value
59         */
60         int getHistogramPoint(int gValue);
61         int getHistogramSize();
62         
63         
64 private:
65         
66          pHistogram*            histogram;
67          pPlotterWindow*        plotter;
68          int                            histogramSize;
69          int                             idHistogram;
70          
71          
72          DECLARE_CLASS(Histogram);
73          //----------------------------------------------------------------------------
74         // wxWidget macro use declaration for handdling events
75         //----------------------------------------------------------------------------
76         DECLARE_EVENT_TABLE()
77         
78 };
79 #endif
80
81