+ HistogramWidget::HistogramWidget( wxWindow *parent, wxWindowID id)
+ : wxPanel(parent,id){
+
+
+ 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
+ plotter->setPopUpMenu(true,true,true,true,true,true,false,false,false,false,false,false,false);
+ histogramSize=0;
+ idTransferenceFunction=-1;
+ idHistogram=-1;
+ transferenceFunctionHasColor=true;
+ transferenceFunctionHasPoints=true;
+ this->type=type;;
+ this->SetAutoLayout(true);
+ this->Refresh();
+
+
+ }
+
+
+
+ void HistogramWidget::initializeHistogram(vtkImageData* img){
+ if(histogram ==NULL){
+ histogram= new pHistogram(img);
+ }
+ //draw
+ drawHistogram();
+ drawTransferenceFunction();
+ }
+