X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkMPR2DView.cxx;h=01c7e1400cc3f42652651dfc2c562649779e7fdf;hb=25e3adf442d6a8d357d52410267445c54426c525;hp=bf823640f06f8c218929e53493565cf6c1a9cd43;hpb=1484229c7f3dab0bc65f08edc2e8d477f92424ff;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index bf82364..01c7e14 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -56,14 +56,14 @@ wxVtkMPR2DView::wxVtkMPR2DView( wxWindow *parent, int direction) //------------------------------------------------------------------- wxVtkMPR2DView::~wxVtkMPR2DView() { - if (_ptsA!=NULL) { _ptsA -> Delete(); } - if (_lineAActor!=NULL) { _lineAActor -> Delete(); } - if (_lineAMapper!=NULL) { _lineAMapper -> Delete(); } - if (_pdA!=NULL) { _pdA -> Delete(); } - if (_ptsB!=NULL) { _ptsB -> Delete(); } - if (_lineBActor!=NULL) { _lineBActor -> Delete(); } - if (_lineBMapper!=NULL) { _lineBMapper -> Delete(); } - if (_pdB!=NULL) { _pdB -> Delete(); } + if (_ptsA!=NULL) { _ptsA->Delete(); } + if (_lineAActor!=NULL) { _lineAActor->Delete(); } + if (_lineAMapper!=NULL) { _lineAMapper->Delete(); } + if (_pdA!=NULL) { _pdA->Delete(); } + if (_ptsB!=NULL) { _ptsB->Delete(); } + if (_lineBActor!=NULL) { _lineBActor->Delete(); } + if (_lineBMapper!=NULL) { _lineBMapper->Delete(); } + if (_pdB!=NULL) { _pdB->Delete(); } } //------------------------------------------------------------------- vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata() @@ -116,7 +116,14 @@ void wxVtkMPR2DView::Configure() _ptsA->SetPoint(1, 1000 , 1000 , 1000 ); _pdA = vtkPolyData::New(); _lineAMapper = vtkPolyDataMapper::New(); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _lineAMapper->SetInput(_pdA); +#else + _lineAMapper->SetInputData(_pdA); +#endif + _lineAMapper->ImmediateModeRenderingOn(); _lineAActor->SetMapper(_lineAMapper); } @@ -155,7 +162,14 @@ void wxVtkMPR2DView::Configure() _pdB->SetPoints( _ptsB ); _pdB->SetLines( linesB ); linesB->Delete(); //do not delete lines ?? + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _lineBMapper->SetInput(_pdB); +#else + _lineBMapper->SetInputData(_pdB); +#endif + _lineBMapper->ImmediateModeRenderingOn(); if(_imageViewer2XYZ) { @@ -353,6 +367,15 @@ void wxVtkMPR2DView::Refresh() focalpoint[0] = x; focalpoint[1] = y; } // if back + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 + // .. +#else + _ptsA->Modified(); + _ptsB->Modified(); +#endif + if (fixAxis2D == true) { GetRenderer()->GetActiveCamera()->SetPosition(position);