# Compare a pixel value between a VTK volume and ITK image

**URL:** <https://discourse.vtk.org/t/compare-a-pixel-value-between-a-vtk-volume-and-itk-image/6092>\
**Category:** Development\
**Created:** [June 28, 2021, 12:38pm UTC](https://discourse.vtk.org/t/compare-a-pixel-value-between-a-vtk-volume-and-itk-image/6092 "2021-06-28T12:38:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hector\_Martinez](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hector_martinez/32/3620_2.png) [@Hector\_Martinez](https://discourse.vtk.org/u/Hector_Martinez)\
**Post date:** [June 28, 2021, 12:38pm UTC](https://discourse.vtk.org/t/compare-a-pixel-value-between-a-vtk-volume-and-itk-image/6092/1 "2021-06-28T12:38:02Z")

</div>

I have two vtkPolyData, one is a liver and the other a tumor. First of all, I select n points from the liver and then, I calculate the Hausdorff distance “” between this points and the tumor. (These vtkPolyDatas, “.vtp” files, were generated from a “.nrrd” image)

On the other hand, I read this nrrd image with ITK and I calculate the Maurer distance between the liver and the tumor.

So, the question is how can I compare the distances calculated with VTK and the distances calculated with ITK?

Can I get a pixel (i, j, k) in the ITK image and a pixel (x, y, z) in the VTK Volume and compare both…? The pixels size are different in images and volume?

Thanks!

Best regards.
