X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkMPR3DView.cxx;h=1d9ff304bb673656854c3d459791030b54ee880f;hb=3283472f764535492122c3b2ade020a749c1bd2a;hp=108b5913765e923e3c7e8d1d0eea9b9868dbc690;hpb=5e1c169dd9642757c10ed86a5279f2ae7a69ed8f;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx index 108b591..1d9ff30 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx @@ -417,8 +417,8 @@ void wxVtkMPR3DView::FreePlaneVisible(int plane, bool ok) { if(_planeWidgetX) { - if (ok==true) - { + if (ok==true) + { //EED 21/07/2013 // 1. Make backup of actors // 2. Putting out all the actors @@ -427,9 +427,9 @@ void wxVtkMPR3DView::FreePlaneVisible(int plane, bool ok) // 5. Refresh // step 1, step 2 - vtkActorCollection *tmpCollection = vtkActorCollection::New(); + vtkActorCollection *tmpCollection = vtkActorCollection::New(); vtkActorCollection *collectionActors = _wxvtk3Dbaseview->GetRenderer()->GetActors(); - int i,size=collectionActors->GetNumberOfItems(); + int i,size=collectionActors->GetNumberOfItems(); for (i=0; iAddItem ( (vtkActor*)collectionActors->GetItemAsObject(0) ); @@ -450,7 +450,7 @@ void wxVtkMPR3DView::FreePlaneVisible(int plane, bool ok) // step 5 Refresh _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render(); - } // if ok + } // if ok if ((plane==1) && (ok==false)) _planeWidgetX->EnabledOff(); if ((plane==2) && (ok==false)) _planeWidgetY->EnabledOff(); if ((plane==3) && (ok==false)) _planeWidgetZ->EnabledOff(); @@ -507,7 +507,9 @@ void wxVtkMPR3DView::RefreshView() // virtual spc[1] = 0; spc[2] = 0; } - //this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData()->GetSpacing(spc); + +// GetVtkMPR3DDataViewer()->Configure(); + //double nx=1,ny=0,nz=0; // JPRx Refresh(); @@ -518,7 +520,6 @@ void wxVtkMPR3DView::RefreshView() // virtual SetColorWindow( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorWindow() ); SetColorLevel( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetColorLevel() ); - double normal[3]; // FreePlaneX _planeWidgetX->GetNormal(normal); @@ -552,7 +553,11 @@ void wxVtkMPR3DView::RefreshView() // virtual y=y*spc[1]; z=z*spc[2]; - if(_pointWidget){ + if(_pointWidget) + { + _pointWidget->SetInput( image ); + _pointWidget->PlaceWidget(); + _pointWidget->SetPosition( x,y,z ); double in[3]; double normal[3]; @@ -564,6 +569,11 @@ void wxVtkMPR3DView::RefreshView() // virtual _planeWidget->UpdatePlacement(); _planeWidget->GetPolyData(_vtkplane); } + + if (_wxvtkmpr3DviewCntrlPanel!=NULL) + { + _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel(false); + } // if _wxvtkmpr3DviewCntrlPanel } //------------------------------------------------------------------- @@ -620,7 +630,6 @@ void wxVtkMPR3DView::VisibleImageActor(int idPosition, bool visible){ int i,size=collectionActors->GetNumberOfItems(); for (i=0; iAddItem ( (vtkActor*)collectionActors->GetItemAsObject(0) ); _wxvtk3Dbaseview->GetRenderer()->RemoveActor( (vtkProp*)tmpCollection->GetItemAsObject(i) ); } // for