}
-void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string dataname, bool usegpu){
- _id = 0;
- _vol = vol;
- _dataname = dataname;
-
+void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string dataname, bool usegpu)
+{
+ _id = 0;
+ _vol = vol;
+ _dataname = dataname;
- _volumePlanes = vtkPlanes::New();
+ _volumePlanes = vtkPlanes::New();
_volumeProperty = vtkVolumeProperty::New();
_volumeProperty->SetInterpolationTypeToLinear();
#if VTK_MAJOR_VERSION >= 6
cout<<"using SmartVolumeRenderingMapper render GPU"<<endl;
- vtkSmartVolumeMapper * smartvolumemapper = vtkSmartVolumeMapper::New();
+ vtkSmartVolumeMapper * smartvolumemapper = vtkSmartVolumeMapper::New();
VolumeMapper = smartvolumemapper;
- smartvolumemapper->AutoAdjustSampleDistancesOn();
+// smartvolumemapper->AutoAdjustSampleDistancesOn();
#else
_compositeFunction = vtkVolumeRayCastCompositeFunction::New();
- _MIPFunction = vtkVolumeRayCastMIPFunction::New();
- vtkVolumeRayCastMapper* volumeMapper = vtkVolumeRayCastMapper::New();
- VolumeMapper = volumeMapper;
+ _MIPFunction = vtkVolumeRayCastMIPFunction::New();
+ vtkVolumeRayCastMapper* volumeMapper = vtkVolumeRayCastMapper::New();
+ VolumeMapper = volumeMapper;
volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
volumeMapper->AutoAdjustSampleDistancesOn();
#endif