]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/Histogram.h
BUG MacOs
[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 //EED Borrame 07Mai2009
42 //      Histogram( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag,vtkImageData* imageData);
43         Histogram( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag);
44         
45         ~Histogram();
46
47         /*
48         Draw the histogram in the plotter
49         */
50         void drawHistogram();
51         /*
52                 if the user resize the window   
53         */
54         void OnSize( wxSizeEvent &WXUNUSED(event) );
55         //---------------------------------------
56         // Get Information from the widget
57         //---------------------------------------
58         
59         /*
60                 get a point of the Histogram
61                 given the grey value
62         */
63         int getHistogramPoint(int gValue);
64         int getHistogramSize();
65         void Configure(vtkImageData* imageData);
66         
67 private:
68         
69          pHistogram*            histogram;
70          pPlotterWindow*        plotter;
71          int                            histogramSize;
72          int                             idHistogram;
73          
74          
75          DECLARE_CLASS(Histogram);
76          //----------------------------------------------------------------------------
77         // wxWidget macro use declaration for handdling events
78         //----------------------------------------------------------------------------
79         DECLARE_EVENT_TABLE()
80         
81 };
82 #endif
83
84