X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkMPR3DView.cxx;h=108b5913765e923e3c7e8d1d0eea9b9868dbc690;hb=b80b4dcc301c1c2c63c0f76cd06b0a434350f7a7;hp=378dadec80206f992eda9fbe9c3a01ebb9a64f70;hpb=97dee12beaba08089198ed7bab9544b8b4c4f240;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx index 378dade..108b591 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx @@ -343,6 +343,20 @@ void wxVtkMPR3DView::ConfigureFreePlanes() _planeWidgetZ->AddObserver(vtkCommand::InteractionEvent, wlipwc ); } + +//------------------------------------------------------------------- +void wxVtkMPR3DView::SetImage() +{ + vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); + // Orthogonal planes B&W + _planeWidgetX->SetInput( imageData ); + _planeWidgetY->SetInput( imageData ); + _planeWidgetZ->SetInput( imageData ); + // -- Plane widget + _probe->SetSource( imageData ); + _vtkmpr3Ddataviewer->SetImage(); +} + //------------------------------------------------------------------- vtkImagePlaneWidget* wxVtkMPR3DView::GetPlaneWidget(unsigned char activationkey, double r, double g, double b, vtkCellPicker* picker) { @@ -390,9 +404,6 @@ vtkImagePlaneWidget* wxVtkMPR3DView::GetPlaneWidget(unsigned char activationkey, //------------------------------------------------------------------- void wxVtkMPR3DView::SetFreePlanesOrtho() { - - - _planeWidgetX->SetPlaneOrientationToXAxes(); _planeWidgetY->SetPlaneOrientationToYAxes(); _planeWidgetZ->SetPlaneOrientationToZAxes(); @@ -480,7 +491,6 @@ void wxVtkMPR3DView::Refresh() // virtual { _wxvtkmpr3DviewCntrlPanel->Refresh(); } - } //------------------------------------------------------------------- @@ -489,7 +499,8 @@ void wxVtkMPR3DView::RefreshView() // virtual double spc[3]; vtkImageData *image = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); - if(image){ + if(image) + { image->GetSpacing(spc); }else{ spc[0] = 0;