X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FboxSurfaceObserver.cxx;h=85cf750d225c60ba2c6f0ede3124e1b08d46c263;hb=9a8f7c9cb08ffcb57f1558b9d20f7fbcd95df017;hp=9c3760aea88a0b4b5d74ea7e1140dd4ecc22177a;hpb=e4ef2b5df5aac431ff3b806f83b7dd5e55e89d86;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx index 9c3760a..85cf750 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx @@ -31,14 +31,20 @@ void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* ca vtkBoxWidget *boxwidget = reinterpret_cast(wdg); boxwidget->GetPlanes(_planes); + if ((_mCubes!=NULL)&&(_tissueStripper!=NULL)&&(_tissueClipper!=NULL)) + { + _mCubes->Update(); + _tissueStripper->Update(); + _tissueClipper->Update(); + } // if surface + + if ( _vtkVolumeRayCastMapper != NULL ) { _vtkVolumeRayCastMapper->RemoveAllClippingPlanes(); -// vtkPlanes *planes = vtkPlanes::New(); -// boxwidget->GetPlanes(planes); -// _vtkVolumeRayCastMapper->SetClippingPlanes(planes); _vtkVolumeRayCastMapper->SetClippingPlanes(_planes); - } + } // if volume + // _actor->VisibilityOn(); @@ -53,7 +59,22 @@ void boxSurfaceObserver::SetActor(vtkProp *actor){ } //------------------------------------------------------------------- -void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper) +#if (VTK_MAJOR_VERSION <= 7) + void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper) +#else + void boxSurfaceObserver::SetvtkFixedPointVolumeRayCastMapper(vtkFixedPointVolumeRayCastMapper *vtkvolumeraycastmapper) +#endif { _vtkVolumeRayCastMapper = vtkvolumeraycastmapper; } + +//------------------------------------------------------------------- +void boxSurfaceObserver::SetFilters(vtkAlgorithm *mCubes , vtkAlgorithm *tissueStripper , vtkAlgorithm *tissueClipper) +{ + _mCubes = mCubes; + _tissueStripper = tissueStripper; + _tissueClipper = tissueClipper; + + +} +