# How to hide and show vtkDistancewidget on vtkResliceImageviewer?

**URL:** <https://discourse.vtk.org/t/how-to-hide-and-show-vtkdistancewidget-on-vtkresliceimageviewer/7902>\
**Category:** Development\
**Created:** [February 23, 2022, 10:36am UTC](https://discourse.vtk.org/t/how-to-hide-and-show-vtkdistancewidget-on-vtkresliceimageviewer/7902 "2022-02-23T10:36:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Usha\_Diggi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/usha_diggi/32/4489_2.png) [@Usha\_Diggi](https://discourse.vtk.org/u/Usha_Diggi)\
**Post date:** [February 23, 2022, 10:36am UTC](https://discourse.vtk.org/t/how-to-hide-and-show-vtkdistancewidget-on-vtkresliceimageviewer/7902/1 "2022-02-23T10:36:27Z")

</div>

Hi,

I created vtkDistanceWidget to measure distance on reslice image viewer. and it works fine but when I scroll through slices, the distanceWidget also appears.  
I want to display the measure tool only for current slice not all slices.

Any assistance you can provide would be greatly appreciated.

Thank you
