X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourMainFrame.cxx;h=37cc8d33f88d2aa9c4fc62b5071fb2bbab335de2;hb=987fba348941c0c59d783d0a803d97d3fb740e5e;hp=1ce584994fc26d25f27de8c341be8249d293c964;hpb=0ac5c532df0c8e1506a58b22ccb4369426f56c4f;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 1ce5849..37cc8d3 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -3178,6 +3178,18 @@ wxPanel *wxContourMainFrame::getColorLayerImageViewPanel(wxWindow *parent) return _viewColorLayerImagePanel; } +void wxContourMainFrame::SetColorLayerImage(vtkImageData* img) +{ + if (_viewColorLayerImagePanel!=NULL) + { + if (img!=NULL) + { + _viewColorLayerImagePanel->SetActive(true); + _viewColorLayerImagePanel->SetImage( img ); +// RefreshInterface(); + } // img + } // _viewColorLayerImagePanel +} wxPanel *wxContourMainFrame::getThresholdImageViewPanel(wxWindow *parent) { @@ -3185,13 +3197,14 @@ wxPanel *wxContourMainFrame::getThresholdImageViewPanel(wxWindow *parent) { double range[2]; _theViewPanel->getImageData()->GetScalarRange(range); - int min = (int)floor (range[0]); - int max = (int)ceil (range[1]); - int start= (max+min)/2 - (max-min)*0.25; - int end= (max+min)/2 + (max-min)*0.25; - _viewThresholdImagePanel = new ThresholdImageViewPanel( parent, min, max, start, end , 1); - _viewThresholdImage = new ThresholdImageView(); + int min = (int)floor (range[0]); + int max = (int)ceil (range[1]); + int start = (max+min)/2 - (max-min)*0.25; + int end = (max+min)/2 + (max-min)*0.25; + _viewThresholdImagePanel = new ThresholdImageViewPanel( parent, min, max, start, end , 1); + _viewThresholdImage = new ThresholdImageView(); _viewThresholdImage->SetminMaxValue(start,end); +// _viewThresholdImage->SetminMaxValue(range[0],range[1]); _viewThresholdImage->SetImage( _theViewPanel->getImageData() ); std::vector colorbarposition; colorbarposition.push_back( 10 ); @@ -3406,6 +3419,15 @@ void wxContourMainFrame::SetXY(int x, int y) _theViewPanel->SetXY(x,y); } +wxVtkBaseView* wxContourMainFrame::GetWxVtkBaseView() +{ + if (_theViewPanel!=NULL) + { + return _theViewPanel->getWxVtkBaseView();; + } else { + return NULL; + } +}