From 8e2ced4052c8d04dda193fe9f220b82bd9d0d156 Mon Sep 17 00:00:00 2001 From: davila Date: Thu, 4 Jun 2015 09:32:24 +0200 Subject: [PATCH] histogram BUG --- .../ThresholdImageView/ColorLayerImageViewPanel.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx index 20a723c..50ee4ff 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewPanel.cxx @@ -113,8 +113,11 @@ ColorLayerImageViewPanel::ColorLayerImageViewPanel(wxWindow* parent, int min, in _interpolationCheckBox->SetValue(true); _opacity = new wxSlider(this, wxID_ANY, 6, 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator); - _histogram = new Histogram( this , -1, wxPoint(0,0), wxSize(400,400), /*wxNO_BORDER*/ wxBORDER_DEFAULT ); - _histogramMinMaxLevel = new HistogramMinMaxLevel( (HistogramBase*)_histogram ); + _histogram=NULL; + _histogramMinMaxLevel=NULL; + +// _histogram = new Histogram( this , -1, wxPoint(0,0), wxSize(400,400), /*wxNO_BORDER*/ wxBORDER_DEFAULT ); +// _histogramMinMaxLevel = new HistogramMinMaxLevel( (HistogramBase*)_histogram ); if (type==0) { @@ -169,7 +172,7 @@ ColorLayerImageViewPanel::ColorLayerImageViewPanel(wxWindow* parent, int min, in sizer -> Add( _sl_SliceImageY , 1, wxGROW ); sizer -> Add( _sl_SliceImageZ , 1, wxGROW ); sizer -> Add( _cb_SliceFixDinamic , 1, wxGROW ); - sizer -> Add( _histogramMinMaxLevel->GetWindow() , 1, wxGROW ); +// sizer -> Add( _histogramMinMaxLevel->GetWindow() , 1, wxGROW ); this->SetSizer( sizer ); this->SetAutoLayout( true ); @@ -229,7 +232,10 @@ void ColorLayerImageViewPanel::SetImage(vtkImageData *img) { if (img!=NULL) { + if (_histogramMinMaxLevel!=NULL) + { _histogramMinMaxLevel->Configure( img ); + } _colorLayerImageViewManager->SetImage( img ); double spc[3]; -- 2.47.1