opacityTransferFunction = vtkPiecewiseFunction::New();
grayTransferFunction = vtkPiecewiseFunction::New();
mCast = NULL;
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
mMIP = NULL;
+#else
+ //
+#endif
+
mMapper = NULL;
mVolume = NULL;
}
mCast=NULL;
}
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
if (mMIP!=NULL)
{
mMIP->Delete();
mMIP=NULL;
}
+#else
+ //
+#endif
if (mMapper!=NULL)
{
// mipProperty->SetAmbient(0.9);
// mipProperty->SetDiffuse(0.9);
// mipProperty->SetSpecular(0.9);
+
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
mMIP = vtkVolumeRayCastMIPFunction::New();
mMIP->SetMaximizeMethodToScalarValue();
mMapper = vtkVolumeRayCastMapper::New();
mMapper->SetVolumeRayCastFunction(mMIP);
+#else
+ mMapper = vtkFixedPointVolumeRayCastMapper::New();
+#endif
+
+
mCast->Update();
//EED 2017-01-01 Migration VTK7
#include "vtkImageData.h"
#include <vtkImageShiftScale.h>
-#include <vtkVolumeRayCastMIPFunction.h>
-#include <vtkVolumeRayCastMapper.h>
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
+ #include <vtkVolumeRayCastMIPFunction.h>
+ #include <vtkVolumeRayCastMapper.h>
+#else
+ #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
+
+
#include "vtkProp3D.h"
#include "vtkVolume.h"
std::vector<double> DensityPoints;
std::vector<double> OpacityValues;
vtkImageShiftScale *mCast;
- vtkVolumeRayCastMIPFunction *mMIP;
- vtkVolumeRayCastMapper *mMapper;
+
+
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
+ vtkVolumeRayCastMIPFunction *mMIP;
+ vtkVolumeRayCastMapper *mMapper;
+#else
+ vtkFixedPointVolumeRayCastMapper *mMapper;
+#endif
+
+
+
vtkVolume *mVolume;
vtkPiecewiseFunction *opacityTransferFunction;
vtkPiecewiseFunction *grayTransferFunction;
void VolumeRenderer::bbUserSetDefaultValues()
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
mRayCastFunction = NULL;
+#else
+ //
+#endif
mMapper = NULL;
mVolume = NULL;
bbSetInputColorFunction(0);
// 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();
//---------------------------------------------------------------------
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();
//#include <vtkImageShiftScale.h>
//#include <vtkVolumeRayCastMIPFunction.h>
#include "vtkVolumeProperty.h"
-#include "vtkVolumeRayCastCompositeFunction.h"
-#include "vtkVolumeRayCastMapper.h"
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
+ #include "vtkVolumeRayCastCompositeFunction.h"
+ #include "vtkVolumeRayCastMapper.h"
+#else
+ #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
#include "vtkProp3D.h"
#include "vtkVolume.h"
private:
vtkVolumeProperty *mVolumeProperty;
+//EED 2018-07-20 Migration VTK8
+#if (VTK_MAJOR_VERSION <= 7)
vtkVolumeRayCastCompositeFunction *mRayCastFunction;
vtkVolumeRayCastMapper *mMapper;
+#else
+ vtkFixedPointVolumeRayCastMapper *mMapper;
+#endif
vtkVolume *mVolume;
vtkVolumeProperty *_volumeProperty;
};