# mouse coordinates from a 3d volume with wrong y

**URL:** https://discourse.vtk.org/t/mouse-coordinates-from-a-3d-volume-with-wrong-y/543
**Category:** Support
**Created:** [March 20, 2019, 2:43pm UTC](https://discourse.vtk.org/t/mouse-coordinates-from-a-3d-volume-with-wrong-y/543 "2019-03-20T14:43:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zandarina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/z/4af34b/32.png) [@zandarina](https://discourse.vtk.org/u/zandarina)
#### Post date: [March 20, 2019, 2:43pm UTC](https://discourse.vtk.org/t/mouse-coordinates-from-a-3d-volume-with-wrong-y/543/1 "2019-03-20T14:43:38Z")

</div>

Dear all,  
I want to get the positions of a volume using the mouse for segmentation. But the y coordinate is wrong. I only get the x and z fine but the depth (y) is not correct. I use this code to get the position. Is there any way to obtain the slice (y position). I only consider vtk (so i do not need the flipping in y). It is interesting that some areas are working more o less. But others the depth is very different. I only have one object.

thanks

```
        // Get the location of the click (in window coordinates)
        int* pos = this->GetInteractor()->GetEventPosition();

        vtkSmartPointer<vtkCellPicker> picker =
            vtkSmartPointer<vtkCellPicker>::New();
        picker->SetTolerance(0.0005);

        //this->GetDefaultRenderer()->Clear();

        // Pick from this location.
        picker->Pick(pos[0], pos[1], 0, global_renderer);

        double* worldPosition = picker->GetPickPosition();
        std::cout << "Cell id is: " << picker->GetCellId() << std::endl;

        if (picker->GetCellId() != -1)
        {

            std::cout << "Pick position is: " << worldPosition[0] << " " << worldPosition[1]
                << " " << worldPosition[2] << endl;
        }
```

---

<div class="post-metadata">

### Author: ![zandarina](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/z/4af34b/32.png) [@zandarina](https://discourse.vtk.org/u/zandarina)
#### Post date: [March 20, 2019, 3:24pm UTC](https://discourse.vtk.org/t/mouse-coordinates-from-a-3d-volume-with-wrong-y/543/2 "2019-03-20T15:24:06Z")

</div>

I realized that there is skin with less opacity and this is why the y is wrong. How can i go through the skin and get the position behind.

Thanks
