vtkClipping3DDataViewer::vtkClipping3DDataViewer()
{
int i;
- for (i=0; i<VTKMPRDATA_MAXTISSUE; i++){
+ for (i=0; i<VTKMPRDATA_MAXTISSUE; i++)
+ {
_visibleTissue[i] = false;
_representationType[i] = true;
}
_shade = false;
_volumerendererdata = VolumeRendererData::New();
+
+#if (VTK_MAJOR_VERSION <= 7)
_volumeMapper = vtkVolumeRayCastMapper::New();
+ _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
+ _compositeFunctionMIP = vtkVolumeRayCastMIPFunction::New();
+#else
+ _volumeMapper = vtkFixedPointVolumeRayCastMapper::New();
+#endif
+
_newvol = vtkVolume::New();
_volumeProperty = vtkVolumeProperty::New();
- _compositeFunction = vtkVolumeRayCastCompositeFunction::New();
- _compositeFunctionMIP = vtkVolumeRayCastMIPFunction::New();
}
//-------------------------------------------------------------------
// Volume
_tfun->Delete();
_ctfun->Delete();
+#if (VTK_MAJOR_VERSION <= 7)
_compositeFunction->Delete();
+#else
+ // ..
+#endif
_volumeMapper->Delete();
_volumeProperty->Delete();
_newvol->Delete();
#endif
+#if (VTK_MAJOR_VERSION <= 7)
_volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
-
- // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
+ // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
+#else
+ // ..
+#endif
//
_volumeMapper->SetClippingPlanes( _volumePlanes );
_observerV = boxSurfaceObserver::New();
_observerV->SetPlanes( _volumePlanes );
_observerV->SetActor( _newvol );
+
+#if (VTK_MAJOR_VERSION <= 7)
_observerV->SetvtkVolumeRayCastMapper( _volumeMapper );
+#else
+ _observerV->SetvtkFixedPointVolumeRayCastMapper( _volumeMapper );
+#endif
}
//-----------------------------------------------------------------------------
void vtkClipping3DDataViewer::updateVolume()
{
+#if (VTK_MAJOR_VERSION <= 7)
if(_isRayCasting)
{
_volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
_volumerendererdata->changeCompositeMIPFunction(0);
- }
- else if(_isMIP)
- {
+ } else if(_isMIP) {
_volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
_volumerendererdata->changeCompositeMIPFunction(1);
}
+#else
+ // ... here Composition of MIP
+ printf("EED vtkClipping3DDataViewer::updateVolume ... here Composition or MIP \n");
+#endif
+
if(_interpolation)
{
return _newvol;
}
//-------------------------------------------------------------------
-vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){
+#if (VTK_MAJOR_VERSION <= 7)
+ vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
+#else
+ vtkFixedPointVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
+#endif
+{
return _volumeMapper;
}
//-------------------------------------------------------------------