# Coordinates(x,y) values and pixel values under the cursor using vtk.js

**URL:** https://discourse.vtk.org/t/coordinates-x-y-values-and-pixel-values-under-the-cursor-using-vtk-js/8095
**Category:** Development
**Created:** [March 21, 2022, 5:59am UTC](https://discourse.vtk.org/t/coordinates-x-y-values-and-pixel-values-under-the-cursor-using-vtk-js/8095 "2022-03-21T05:59:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sneha-pk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sneha-pk/32/4216_2.png) [@Sneha-pk](https://discourse.vtk.org/u/Sneha-pk)
#### Post date: [March 21, 2022, 5:59am UTC](https://discourse.vtk.org/t/coordinates-x-y-values-and-pixel-values-under-the-cursor-using-vtk-js/8095/1 "2022-03-21T05:59:35Z")

</div>

I am trying to display the coordinates(x,y) under the mouse cursor (on mousemove event) and also the pixel value using vtk.js on a vtkImageSlice. Is there any widget that already does that ?  
I know how to do that using javascript but want to know if it is possible in vtk.js .

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [March 21, 2022, 3:21pm UTC](https://discourse.vtk.org/t/coordinates-x-y-values-and-pixel-values-under-the-cursor-using-vtk-js/8095/2 "2022-03-21T15:21:30Z")

</div>

You will have to do it in JS and query the pixel value with maybe a PointPicker on the vtkImageSlice.
