# VTK ray cast volume rendering window freeze if volumeMapper.SetImageSampleDistance less than 1.0

**URL:** https://discourse.vtk.org/t/vtk-ray-cast-volume-rendering-window-freeze-if-volumemapper-setimagesampledistance-less-than-1-0/5405
**Category:** Support
**Created:** [March 18, 2021, 9:17pm UTC](https://discourse.vtk.org/t/vtk-ray-cast-volume-rendering-window-freeze-if-volumemapper-setimagesampledistance-less-than-1-0/5405 "2021-03-18T21:17:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![desheng](https://discourse.vtk.org/user_avatar/discourse.vtk.org/desheng/32/2764_2.png) [@desheng](https://discourse.vtk.org/u/desheng)
#### Post date: [March 18, 2021, 9:17pm UTC](https://discourse.vtk.org/t/vtk-ray-cast-volume-rendering-window-freeze-if-volumemapper-setimagesampledistance-less-than-1-0/5405/1 "2021-03-18T21:17:19Z")

</div>

Hi, I notice a confusing vtk problem: when we use vtk.vtkGPUVolumeRayCastMapper() and set volumeMapper.SetImageSampleDistance(0.5) ----or any value less than 1.0, the interactive window freeze. No response to mouse movement.

To reproduce, use this code:

> <https://github.com/Kitware/VTK/blob/master/Examples/VolumeRendering/Python/SimpleRayCast.py>

add

volumeMapper.SetImageSampleDistance(0.5)

after

volumeMapper.SetInputConnection(reader.GetOutputPort())

Thanks for any help.
