X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FpPlotter%2FHistogramWidget.h;h=e04bbb150662f63a4bfdf8378b6547ee52ef892c;hb=ae196719490130990cdde501c982c3370b46b21c;hp=ff2d80329075a1d080899f3ecf7e662669e50046;hpb=c5feadbb145eecf6d73f793535b7e23eb18db2cb;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h index ff2d803..e04bbb1 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.h @@ -16,6 +16,7 @@ #include #endif +#include "marTypes.h" #include "pPlotter.h" #include "pFunctionPoint.h" #include "vtkImageData.h" @@ -23,11 +24,11 @@ #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: //--------------------- @@ -38,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(); @@ -133,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& greylevel,std::vector& 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& greylevel, + std::vector& red, + std::vector& green, + std::vector& blue); + private: pHistogram* histogram; @@ -149,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); //----------------------------------------------------------------------------