]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramWidget.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / pPlotter / HistogramWidget.cxx
index 1badcefd5ddff0a367a7622d46443ede3ecddf04..51a30e7354cf7e6b9c0b1237a89570c97b6a91e9 100644 (file)
@@ -8,6 +8,7 @@
  #include "HistogramWidget.h"
  #include  "vtkImageCast.h"
  #include  <math.h>
+
 // ----------------------------------------------------------------------------
 // WX headers inclusion.
 // For compilers that support precompilation, includes <wx/wx.h>.
@@ -15,8 +16,9 @@
 
        #ifndef WX_PRECOMP
        #include <wx/wx.h>
-       #endif
 
+       #endif
+#include <wx/bitmap.h>
 //----------------------------------------------------------------------------
 // Class implementation
 //----------------------------------------------------------------------------
@@ -41,15 +43,16 @@ HistogramWidget::HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint
        }
  */
        HistogramWidget::HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag,vtkImageData* imageData,int type):
-       wxPanel(parent,id,pos,size)
+       wxPanel(parent,id,wxDefaultPosition,wxDefaultSize)
        {
                 SetBackgroundColour(wxColour(255,255,255));
                //histogram
                histogram= new pHistogram(imageData);
+
                
                //plotter
                plotter=new pPlotter(this, 400,350);
-
+               
                //is a plotter of histograms
                plotter->setType(2);
                //setting the popMenu
@@ -59,8 +62,11 @@ HistogramWidget::HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint
                idHistogram=-1;
                transferenceFunctionHasColor=true;
                transferenceFunctionHasPoints=true;
-               this->type=type;;
+               this->type=type;
                
+               this->SetAutoLayout(true);
+               this->Refresh();
+        
                //drawing
                drawHistogram();
                drawTransferenceFunction();
@@ -74,9 +80,10 @@ HistogramWidget::HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint
                        SetBackgroundColour(wxColour(255,255,255));
                        histogram = NULL;       
                        
+                       
                        //plotter
                        plotter=new pPlotter(this, 400,350);
-
+                       
                        //is a plotter of histograms
                        plotter->setType(2);
                        //setting the popMenu
@@ -87,10 +94,14 @@ HistogramWidget::HistogramWidget( wxWindow *parent, wxWindowID id, const wxPoint
                        transferenceFunctionHasColor=true;
                        transferenceFunctionHasPoints=true;
                        this->type=type;;
+                       this->SetAutoLayout(true);
+                       this->Refresh();
                
                                
        }
 
+       
+       
        void HistogramWidget::initializeHistogram(vtkImageData* img){
                if(histogram ==NULL){
                        histogram= new pHistogram(img);