# How to display the vtkSmartVolumeMapper with isosurface?

**URL:** https://discourse.vtk.org/t/how-to-display-the-vtksmartvolumemapper-with-isosurface/10961
**Category:** Support
**Created:** [March 14, 2023, 5:55am UTC](https://discourse.vtk.org/t/how-to-display-the-vtksmartvolumemapper-with-isosurface/10961 "2023-03-14T05:55:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.vtk.org/user_avatar/discourse.vtk.org/zhang-qiang-github/32/2519_2.png) [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)
#### Post date: [March 14, 2023, 5:55am UTC](https://discourse.vtk.org/t/how-to-display-the-vtksmartvolumemapper-with-isosurface/10961/1 "2023-03-14T05:55:11Z")

</div>

Now, I want to use the `isosurface` with `vtkSmartVolumeMapper`. My code is:

```auto
import vtkmodules.all as vtk
import time
reader = vtk.vtkDICOMImageReader()
reader.SetDirectoryName('D:\\TestData\\20210811095000100001')
reader.Update()

img = reader.GetOutput()

mapper = vtk.vtkSmartVolumeMapper()
mapper.SetInputData(img)
mapper.SetBlendModeToIsoSurface()
mapper.Update()

actor = vtk.vtkVolume()
actor.SetMapper(mapper)
actor.GetProperty().GetIsoSurfaceValues().SetValue(0, 300)
color = vtk.vtkColorTransferFunction()
color.AddRGBPoint(300, 0, 0, 1)
actor.GetProperty().SetColor(0, color)
actor.Update()

renderer = vtk.vtkRenderer()
renderer.AddActor(actor)
renderer.SetBackground(1, 1, 1)
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(renderer)
renWin.Render()
iren = vtk.vtkRenderWindowInteractor()
iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())
iren.SetRenderWindow(renWin)
iren.Initialize()
iren.Start()

```

The result is:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/c/cbe84234551680000056b4f450accdefeb3a1c45.png)

It do not has any shadow. How to add shadow for the actor?

I want to try `actor.GetProperty().SetInterpolationToPhong()`, but the `vtkVolumeProperty` has no `SetInterpolationToPhong` method.

Any suggestion is appreciated~~~

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [March 14, 2023, 3:51pm UTC](https://discourse.vtk.org/t/how-to-display-the-vtksmartvolumemapper-with-isosurface/10961/2 "2023-03-14T15:51:40Z")

</div>

To enable volume shading do:

```cpp
volumeProperty->SetShade(1);

```
