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=e263b7ace0f53d647a731553a3f67700838ad146;hp=a7680bb84171bd365bb03b189a5a1d18c1c4f411;hpb=d5e0666e18ece9462fa780e06a3b3a541266363c;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx index a7680bb..d71d3e9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.cxx @@ -32,18 +32,22 @@ 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(); @@ -74,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(); @@ -113,14 +125,24 @@ void wxMaracasMultipleVolumeRendererManagerData::setVolumeOpacity(std::vectorSetVolumeRayCastFunction(_compositeFunction); }else{ _volumeMapper->SetVolumeRayCastFunction(_MIPFunction); } - +#else + printf("EED wxMaracasMultipleVolumeRendererManagerData::changeCompositeMIPFunction Composite MIP ..... ??"); +#endif }