From: Eduardo DAVILA Date: Tue, 27 Sep 2016 12:57:26 +0000 (+0200) Subject: #3019 creaMaracasVisu Bug New Normal Windows MPR2D refresh X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b6acee59da3bb94b6619f79705580d5a3a1cc997;p=creaMaracasVisu.git #3019 creaMaracasVisu Bug New Normal Windows MPR2D refresh --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 9fee226..8578922 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -361,15 +361,15 @@ void wxMaracas_ViewerWidget::Refresh(bool eraseBackground ,const wxRect* rect ) //------------------------------------------------------------------------- void wxMaracas_ViewerWidget::RefreshView() { - if (mvtk2Dbaseview !=NULL ){ mvtk2Dbaseview->Refresh(); } - if (mvtkmpr2Dview_X !=NULL ){ mvtkmpr2Dview_X->Refresh(); } - if (mvtkmpr2Dview_Y !=NULL ){ mvtkmpr2Dview_Y->Refresh(); } - if (mvtkmpr2Dview_Z !=NULL ){ mvtkmpr2Dview_Z->Refresh(); } - if (mvtkplane2Dview !=NULL ){ mvtkplane2Dview->Refresh(); } - if (mwxsphereview !=NULL ){ mwxsphereview ->RefreshView(); } - if (mwxvtkmpr3Dview !=NULL ){ mwxvtkmpr3Dview->RefreshView(); } - if (mwxvtkclipping3Dview !=NULL ){ mwxvtkclipping3Dview->Refresh(); } - if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D->Refresh(); } + if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D->Refresh(); } + if (mwxvtkclipping3Dview !=NULL ){ mwxvtkclipping3Dview->Refresh(); } + if (mwxvtkmpr3Dview !=NULL ){ mwxvtkmpr3Dview->RefreshView(); } + if (mvtk2Dbaseview !=NULL ){ mvtk2Dbaseview->Refresh(); } + if (mvtkmpr2Dview_X !=NULL ){ mvtkmpr2Dview_X->Refresh(); } + if (mvtkmpr2Dview_Y !=NULL ){ mvtkmpr2Dview_Y->Refresh(); } + if (mvtkmpr2Dview_Z !=NULL ){ mvtkmpr2Dview_Z->Refresh(); } + if (mvtkplane2Dview !=NULL ){ mvtkplane2Dview->Refresh(); } + if (mwxsphereview !=NULL ){ mwxsphereview ->RefreshView(); } } //------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index 50354ae..88ce1ac 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -73,20 +73,19 @@ void wxVtkBaseView::Configure() // virtual //------------------------------------------------------------------- void wxVtkBaseView::Refresh() // virtual { - // EED 10 Oct 2007 #if defined(WIN32) - _iren->Refresh(false); + _iren->Refresh(true); +// EED 27 sept 2016 + vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); + vri->vtkRenderWindowInteractor::Render(); #else - //EED 01Avril2009 // _iren->Render(); vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); vri->vtkRenderWindowInteractor::Render(); - //_iren->Refresh(); #endif - } //------------------------------------------------------------------- void wxVtkBaseView::RefreshView() // virtual diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index bee80ab..96fad29 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -289,8 +289,7 @@ void wxVtkMPR2DView::Refresh() z = zz*spc[2]; - if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) { - + if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ) ) { if (_direction==0) { // YZ if(_imageViewer2XYZ) { @@ -349,17 +348,15 @@ void wxVtkMPR2DView::Refresh() _backY=yy; _backZ=zz; } - - //EED 2016/02/19 vtkImageActor *imageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor(); imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() ); - //EED 01nov2012 UpdateColorWindowLevel(); wxVtkBaseView::Refresh(); } } + //------------------------------------------------------------------- int wxVtkMPR2DView::GetActualSlice() // virtual {