]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkVolumeRenderer.cxx
3205 BBTK Feature New Normal branch vtk7itk4wx3-mxecc
[bbtk.git] / packages / vtk / src / bbvtkVolumeRenderer.cxx
index a3b39a5a2d17611513f6b40418fe53348e033ad2..3c5b371acb3201e38410c32f21f3ef05548c167a 100644 (file)
@@ -59,7 +59,12 @@ namespace bbvtk
 
    void VolumeRenderer::bbUserSetDefaultValues() 
    { 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
           mRayCastFunction = NULL;
+#else
+       //
+#endif
           mMapper                      = NULL;
           mVolume                      = NULL;
           bbSetInputColorFunction(0);
@@ -78,11 +83,16 @@ namespace bbvtk
     //    mMIP = vtkVolumeRayCastMIPFunction::New();
     //    mMIP->SetMaximizeMethodToScalarValue();
 
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7) 
     mRayCastFunction = vtkVolumeRayCastCompositeFunction::New();
     mMapper = vtkVolumeRayCastMapper::New();
           mMapper->SetVolumeRayCastFunction(mRayCastFunction);
           mMapper->AutoAdjustSampleDistancesOn();
-
+#else 
+         mMapper = vtkFixedPointVolumeRayCastMapper::New();
+#endif
+                  
           _volumeProperty = vtkVolumeProperty::New();  
        _volumeProperty->SetInterpolationTypeToLinear();
        _volumeProperty->ShadeOn();
@@ -102,11 +112,16 @@ namespace bbvtk
        //---------------------------------------------------------------------
    void VolumeRenderer::bbUserFinalizeProcessing() 
    { 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
           if (mRayCastFunction!=NULL)
           {
                   mRayCastFunction->Delete();
                   mRayCastFunction=NULL;
           }      
+#else
+       //
+#endif
           if (mMapper!=NULL)
           {
                   mMapper->Delete();