]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h
creaButtonContainer: exceptions added, doxygen documentation added :)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / HistogramWidget.h
index 1df255dcba52ef2fe0819857138b2ee82e9022e9..e04bbb150662f63a4bfdf8378b6547ee52ef892c 100644 (file)
 #include "pPlotterScaleY.h"
 #include "pPlotterScaleX.h"
 
-#define MAX 500
+//#define MAX 500
 #define NUM_POINTS 100
 #define WINDOW_SIZE 10
 
-class MARACASVISULIB_EXPORTS HistogramWidget:public wxPanel
+class creaMaracasVisu_EXPORT HistogramWidget:public wxPanel
 {
 public:
        //---------------------
@@ -39,6 +39,8 @@ public:
        
  
        HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag,vtkImageData* imageData,int type);
+
+       HistogramWidget( wxWindow *parent, wxWindowID id);
        
        ~HistogramWidget();
 
@@ -134,8 +136,26 @@ public:
        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;
@@ -150,11 +170,12 @@ private:
         */
         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);
         //----------------------------------------------------------------------------