# world coordinates do not give the correct dicom coordinate

**URL:** https://discourse.vtk.org/t/world-coordinates-do-not-give-the-correct-dicom-coordinate/452
**Category:** Support
**Created:** [March 11, 2019, 5:25pm UTC](https://discourse.vtk.org/t/world-coordinates-do-not-give-the-correct-dicom-coordinate/452 "2019-03-11T17:25:11Z")
**Posts on this page:** 1
**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 11, 2019, 5:25pm UTC](https://discourse.vtk.org/t/world-coordinates-do-not-give-the-correct-dicom-coordinate/452/1 "2019-03-11T17:25:11Z")

</div>

Dear all,

I want to do segmentation with itk and i would like to select a seed using  
vtk with the mouse. I get the coordinates in world coordinates

```
                    int x = this->Interactor->GetEventPosition()[0];
                    int y = this->Interactor->GetEventPosition()[1];
                    std::cout << "(x,y) = (" << x << "," << y << ")" << std::endl;

                    seeds[0] = x;
                    seeds[1] = y;

```

but when i want to use it as a seed for itk i see it is the wrong place. I  
tried the transformphysicalpointoindex but the result is even worst

```
            bool isInside =
                    extractFilter->GetOutput()->TransformPhysicalPointToIndex(coordinate_vtk,

```

coordinate\_itk);  
if (isInside) {

```
                    ImageType::PixelType pixelValue =

```

extractFilter-\>GetOutput()-\>GetPixel(coordinate\_itk);  
}

Any help about the coordinates in vtk?

Thanks
