X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourMainFrame.cxx;h=a1276c02d64c391390055a37a38fd98ebd07023c;hb=6383d69864c69a97539b59d3e39406c79408577b;hp=499121e075499d8b22bf28899922dc1cd10317f9;hpb=b13d5fc346334fa875520c47c219a7092e80d09d;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 499121e..a1276c0 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -68,7 +68,8 @@ char wxContourMainFrame::COPY = 'C'; _viewMaskImagePanel = NULL; _viewThresholdImage = NULL; _viewThresholdImagePanel = NULL; - + _viewColorLayerImage = NULL; + _viewColorLayerImagePanel = NULL; } wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector images, long style,std::string datadir) @@ -88,6 +89,8 @@ char wxContourMainFrame::COPY = 'C'; _viewMaskImagePanel = NULL; _viewThresholdImage = NULL; _viewThresholdImagePanel = NULL; + _viewColorLayerImage = NULL; + _viewColorLayerImagePanel = NULL; // set up default notebook style m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER; @@ -670,7 +673,15 @@ void wxContourMainFrame::changeInstant() _viewThresholdImage->onThreshold(); } } - + + // Refresh Threshold image + if(_viewColorLayerImage!=NULL){ + _viewColorLayerImage->SetZ(actualSlice); + if (_viewColorLayerImagePanel->IsVisible()==true){ + _viewColorLayerImage->onThreshold(); + } + } + updateInstantOutlines(); updateInstantImageData(); updateInstantAxes(); @@ -3028,20 +3039,15 @@ wxPanel *wxContourMainFrame::getColorLayerImageViewPanel(wxWindow *parent) { if (_viewColorLayerImagePanel==NULL) { - _viewColorLayerImagePanel = new wxPanel(parent, -1); -/*EED Borrame double range[2]; _theViewPanel->getImageData()->GetScalarRange(range); int min = (int)floor (range[0]); int max = (int)ceil (range[1]); - _viewColorLayerImagePanel = new ThresholdImageViewPanel( parent, min, max , 1); - _viewThresholdImage = new ThresholdImageView(); - _viewThresholdImage->SetImage( _theViewPanel->getImageData() ); - _viewThresholdImage->SetminMaxValue( min, max); - _viewThresholdImage->SetBaseColor( 1,0,0 ); - _viewThresholdImagePanel->SetThresholdImageView( _viewThresholdImage ); - _viewThresholdImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() ); -*/ + _viewColorLayerImagePanel = new ColorLayerImageViewPanel( parent, min, max , 1); + _viewColorLayerImage = new ColorLayerImageView(); + _viewColorLayerImage->SetImage( _theViewPanel->getImageData() ); + _viewColorLayerImagePanel->SetColorLayerImageView( _viewColorLayerImage ); + _viewColorLayerImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() ); } return _viewColorLayerImagePanel; }