X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkBaseView.cxx;h=17c3616c058f56dccf4d5a6d3bb130754e04067b;hb=21c2226cf3dcad1daf3fb04818583b559694fa81;hp=a090ea23019315d69916de4cc57bf8774743dbc9;hpb=c5feadbb145eecf6d73f793535b7e23eb18db2cb;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx index a090ea2..17c3616 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx @@ -13,6 +13,7 @@ #include "wxVtkBaseView.h" + vtkStandardNewMacro(vtkInteractorStyleBaseView); vtkStandardNewMacro(vtkInteractorStyleBaseView2D); vtkStandardNewMacro(vtkInteractorStyleBaseView3D); @@ -208,7 +209,13 @@ void wxVtkBaseView::Refresh() // virtual #if defined(WIN32) _iren->Refresh(false); #else - _iren->Render(); + +//EED 01Avril2009 +// _iren->Render(); + vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); + vri->vtkRenderWindowInteractor::Render(); + + //_iren->Refresh(); #endif @@ -533,7 +540,7 @@ bool vtkInteractorScrollZ::OnRightButtonUp() bool vtkInteractorScrollZ::OnMouseMove () { if (_stateFordware==true){ - int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0]; + //int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0]; // JPRx int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; int delta = (_fordwareY - fy)/3; _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->SetActualSlice( _sliceZ + delta); @@ -1015,16 +1022,16 @@ void vtkInteractorStyleBaseView3D::OnMouseMove () // this->vtkInteractorStyleTrackballCamera::OnMouseMove(); - int x = this->Interactor->GetEventPosition()[0]; - int y = this->Interactor->GetEventPosition()[1]; + // int x = this->Interactor->GetEventPosition()[0]; // JPRx + // int y = this->Interactor->GetEventPosition()[1]; // JPRx - vtkRenderWindowInteractor *rwi = this->Interactor; + // vtkRenderWindowInteractor *rwi = this->Interactor; - int lx = rwi->GetLastEventPosition()[0]; - int ly = rwi->GetLastEventPosition()[1]; - int dx = rwi->GetEventPosition()[0] ; - int dy = rwi->GetEventPosition()[1] ; + // int lx = rwi->GetLastEventPosition()[0]; // JPRx + // int ly = rwi->GetLastEventPosition()[1]; // JPRx + // int dx = rwi->GetEventPosition()[0] ; // JPRx + // int dy = rwi->GetEventPosition()[1] ; // JPRx switch (this->State) @@ -1200,7 +1207,7 @@ vtkTextActor *vtkInfoTextImage::Create_Text_Label(int px, int py ) // Text Window Level vtkTextActor *textActor = vtkTextActor::New(); textActor->SetDisplayPosition(px, py); - textActor->SetInput("--"); + textActor->SetInput("0"); // Set coordinates to match the old vtkScaledTextActor default value textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport(); @@ -1340,7 +1347,7 @@ void vtkInfoTextImage::PutPixelIntensity(int xx, int yy, int zz) char zTzxt[20]; char resultText[50]; - strcpy(resultText,"NG: "); + strcpy(resultText,"GL: "); if (ok==true) { unsigned short *pOrg=(unsigned short*)imagedata->GetScalarPointer ((int)xx,(int)yy,(int)zz); // itoa (*pOrg,zTzxt,10); @@ -1548,7 +1555,7 @@ void wxVtk2DBaseView::Configure(bool okimage) camera->SetClippingRange( 0.01 , 1000000 ); camera->ComputeViewPlaneNormal(); camera->SetParallelScale( spx*(x2-x1)/3.0 ); - + // text information over the graphic window _vtkIinfoTextImage = new vtkInfoTextImage(); _vtkIinfoTextImageInteractor = new vtkInfoTextImageInteractor();