X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkClipping3DDataViewer.cxx;h=bca71dd8c8e0231095c189490429b3ee9777c22e;hb=547be998e10b62d3b548146513607c227a9829cd;hp=646baf280d5cc60011db3a2a02c141f32ef7d294;hpb=56eb704bce4e7a4206ffa16c84f3000b8b8f93eb;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..bca71dd 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx @@ -42,11 +42,17 @@ vtkClipping3DDataViewer::vtkClipping3DDataViewer() _shade = false; _volumerendererdata = VolumeRendererData::New(); + +#if (VTK_MAJOR_VERSION <= 7) _volumeMapper = vtkVolumeRayCastMapper::New(); + _compositeFunction = vtkVolumeRayCastCompositeFunction::New(); + _compositeFunctionMIP = vtkVolumeRayCastMIPFunction::New(); +#else + _volumeMapper = vtkFixedPointVolumeRayCastMapper::New(); +#endif + _newvol = vtkVolume::New(); _volumeProperty = vtkVolumeProperty::New(); - _compositeFunction = vtkVolumeRayCastCompositeFunction::New(); - _compositeFunctionMIP = vtkVolumeRayCastMIPFunction::New(); } //------------------------------------------------------------------- @@ -64,7 +70,11 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer() // Volume _tfun->Delete(); _ctfun->Delete(); +#if (VTK_MAJOR_VERSION <= 7) _compositeFunction->Delete(); +#else + // .. +#endif _volumeMapper->Delete(); _volumeProperty->Delete(); _newvol->Delete(); @@ -398,9 +408,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 +442,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 +508,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 +576,12 @@ vtkVolume* vtkClipping3DDataViewer::GetVolumeActor() return _newvol; } //------------------------------------------------------------------- -vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){ +#if (VTK_MAJOR_VERSION <= 7) + vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper() +#else + vtkFixedPointVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper() +#endif +{ return _volumeMapper; } //-------------------------------------------------------------------