X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxMaracasMultipleVolumeRendererManagerData.cxx;h=d71d3e91bac1b45d89d1006f682f54a80932bf63;hb=c759b7f356f197cac69e058fe355b2afc5daabf1;hp=89d4dee29bad7d5d9b52c7740a9cb2bb62872372;hpb=e4ef2b5df5aac431ff3b806f83b7dd5e55e89d86;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx index 89d4dee..d71d3e9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx @@ -32,23 +32,27 @@ wxMaracasMultipleVolumeRendererManagerData::wxMaracasMultipleVolumeRendererManagerData(vtkImageData* vol, std::string dataname){ - _vol = vol; - _dataname = dataname; - - _tfun = vtkPiecewiseFunction::New(); - _ctfun = vtkColorTransferFunction::New(); + _vol = vol; + _dataname = dataname; + _tfun = vtkPiecewiseFunction::New(); + _ctfun = vtkColorTransferFunction::New(); + _volumePlanes = vtkPlanes::New(); - _volumePlanes = vtkPlanes::New(); - _compositeFunction = vtkVolumeRayCastCompositeFunction::New(); - _MIPFunction = vtkVolumeRayCastMIPFunction::New(); - _volumeMapper = vtkVolumeRayCastMapper::New(); +#if (VTK_MAJOR_VERSION <= 7) + _compositeFunction = vtkVolumeRayCastCompositeFunction::New(); + _MIPFunction = vtkVolumeRayCastMIPFunction::New(); + _volumeMapper = vtkVolumeRayCastMapper::New(); _volumeMapper->SetVolumeRayCastFunction(_compositeFunction); +#else + _volumeMapper = vtkFixedPointVolumeRayCastMapper::New(); +#endif + _volumeMapper->SetClippingPlanes( _volumePlanes ); _volumeMapper->AutoAdjustSampleDistancesOn(); _volumeProperty = vtkVolumeProperty::New(); _volumeProperty->SetInterpolationTypeToLinear(); - //_volumeProperty->ShadeOn(); + _volumeProperty->ShadeOn(); _volumeProperty->DisableGradientOpacityOn(); _volumeProperty->SetColor(_ctfun); _volumeProperty->SetScalarOpacity(_tfun ); @@ -56,7 +60,14 @@ wxMaracasMultipleVolumeRendererManagerData::wxMaracasMultipleVolumeRendererManag _newvol = vtkVolume::New(); _newvol->SetMapper(_volumeMapper ); _newvol->SetProperty(_volumeProperty ); + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 _volumeMapper->SetInput( _vol ); +#else + _volumeMapper->SetInputData( _vol ); +#endif + _volumeMapper->Update(); _newvol->Update(); } @@ -67,8 +78,16 @@ wxMaracasMultipleVolumeRendererManagerData::~wxMaracasMultipleVolumeRendererMana _tfun->Delete(); _ctfun->Delete(); _volumePlanes->Delete(); + + +#if (VTK_MAJOR_VERSION <= 7) _compositeFunction->Delete(); +#else + // .. +#endif + _volumeMapper->Delete(); + _volumeProperty->Delete(); _newvol->Delete(); @@ -106,14 +125,24 @@ void wxMaracasMultipleVolumeRendererManagerData::setVolumeOpacity(std::vectorSetVolumeRayCastFunction(_compositeFunction); }else{ _volumeMapper->SetVolumeRayCastFunction(_MIPFunction); } - +#else + printf("EED wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction Composite MIP ..... ??"); +#endif }