#include <wx/wx.h>
#endif
+#include "marTypes.h"
#include "pPlotter.h"
#include "pFunctionPoint.h"
#include "vtkImageData.h"
#include "pPlotterScaleY.h"
#include "pPlotterScaleX.h"
-#define MAX 500
+//#define MAX 500
#define NUM_POINTS 100
#define WINDOW_SIZE 10
-class HistogramWidget:public wxPanel
+class creaMaracasVisu_EXPORT HistogramWidget:public wxPanel
{
public:
//---------------------
HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag,vtkImageData* imageData,int type);
+
+ HistogramWidget( wxWindow *parent, wxWindowID id);
~HistogramWidget();
int getHistogramSize();
void setType(int type);
+ /**
+ ** Initialize the histogram
+ */
+ void initializeHistogram(vtkImageData* img);
+ /**
+ ** Returns two vectors, the grey level of the point and its value, the value is between [0,1]
+ **/
+ void GetValuesPointsFunction(std::vector<double>& greylevel,std::vector<double>& value);
+
+ /**
+ ** Returns two vectors, the grey level of the point and its value, the red, green
+ ** and blue value is between [0,1]
+ **/
+ void GetValuesColorPointsFunction(std::vector<double>& greylevel,
+ std::vector<double>& red,
+ std::vector<double>& green,
+ std::vector<double>& blue);
+
private:
pHistogram* histogram;
*/
bool transferenceFunctionHasPoints;
bool transferenceFunctionHasColor;
+ wxPanel* getControls();
/*
* type=1 with transference function for moving
* type=2 without transference function for moving
*/
- int type;
+ int type;
DECLARE_CLASS(HistogramWidget);
//----------------------------------------------------------------------------