X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkClipping3DDataViewer.cxx;h=aa398d488971528129d01e2c83955763b62c0f49;hb=f9901e756bb82bd333310b47607875331616bb29;hp=646baf280d5cc60011db3a2a02c141f32ef7d294;hpb=2e5f20e24f05f896066629e489d825558cdc3cd5;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx index 646baf2..aa398d4 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx @@ -31,7 +31,8 @@ vtkClipping3DDataViewer::vtkClipping3DDataViewer() { int i; - for (i=0; iDelete(); _ctfun->Delete(); +#if (VTK_MAJOR_VERSION <= 7) _compositeFunction->Delete(); +#else + // .. +#endif _volumeMapper->Delete(); _volumeProperty->Delete(); _newvol->Delete(); @@ -398,9 +409,12 @@ void vtkClipping3DDataViewer::Configure_Volume() #endif +#if (VTK_MAJOR_VERSION <= 7) _volumeMapper->SetVolumeRayCastFunction(_compositeFunction); - - // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP); + // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP); +#else + // .. +#endif // _volumeMapper->SetClippingPlanes( _volumePlanes ); @@ -429,7 +443,12 @@ void vtkClipping3DDataViewer::Configure_Volume() _observerV = boxSurfaceObserver::New(); _observerV->SetPlanes( _volumePlanes ); _observerV->SetActor( _newvol ); + +#if (VTK_MAJOR_VERSION <= 7) _observerV->SetvtkVolumeRayCastMapper( _volumeMapper ); +#else + _observerV->SetvtkFixedPointVolumeRayCastMapper( _volumeMapper ); +#endif } //----------------------------------------------------------------------------- @@ -490,16 +509,20 @@ void vtkClipping3DDataViewer::UpdateVolumeBox(vector gf, vector void vtkClipping3DDataViewer::updateVolume() { +#if (VTK_MAJOR_VERSION <= 7) if(_isRayCasting) { _volumeMapper->SetVolumeRayCastFunction(_compositeFunction); _volumerendererdata->changeCompositeMIPFunction(0); - } - else if(_isMIP) - { + } else if(_isMIP) { _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP); _volumerendererdata->changeCompositeMIPFunction(1); } +#else + // ... here Composition of MIP + printf("EED vtkClipping3DDataViewer::updateVolume ... here Composition or MIP \n"); +#endif + if(_interpolation) { @@ -554,7 +577,12 @@ vtkVolume* vtkClipping3DDataViewer::GetVolumeActor() return _newvol; } //------------------------------------------------------------------- -vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){ +#if (VTK_MAJOR_VERSION <= 7) + vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper() +#else + vtkFixedPointVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper() +#endif +{ return _volumeMapper; } //-------------------------------------------------------------------