# Coordinates of points around each voxle

**URL:** <https://discourse.slicer.org/t/coordinates-of-points-around-each-voxle/26250>\
**Category:** Support\
**Created:** [November 15, 2022, 5:23pm UTC](https://discourse.slicer.org/t/coordinates-of-points-around-each-voxle/26250 "2022-11-15T17:23:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZSoltani](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zsoltani/32/17166_2.png) [@ZSoltani](https://discourse.slicer.org/u/ZSoltani)\
**Post date:** [November 15, 2022, 5:23pm UTC](https://discourse.slicer.org/t/coordinates-of-points-around-each-voxle/26250/1 "2022-11-15T17:23:46Z")

</div>

Hello all,

I need to extract the coordinates of corner points around each voxel, for all voxels. Is there any way to do that?

The resolution of the voxels are shown in the below picture, after turning off the interpolation option.

Thanks,  
Zahra

 ![Screenshot from 2022-11-15 12-17-37](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/1/3134f1325b7cdbcb5c89e55eaade682d07550c9f.png)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 15, 2022, 11:19pm UTC](https://discourse.slicer.org/t/coordinates-of-points-around-each-voxle/26250/2 "2022-11-15T23:19:54Z")

</div>

Yes, the mapping between voxel coordinates (IJK in Slicer) and world, or RAS coordinates is defined by the IJKToRAS matrix. There are [examples](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#get-centroid-of-a-segment-in-world-ras-coordinates) of this mapping. The IJK of 0,0,0 maps to the center of the first voxel in the volume, so you need to add 1/2 voxel offsets in all directions to get the coordinates of the corners.

---

<div class="post-metadata">

**Author:** ![ZSoltani](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zsoltani/32/17166_2.png) [@ZSoltani](https://discourse.slicer.org/u/ZSoltani)\
**Post date:** [November 17, 2022, 6:56pm UTC](https://discourse.slicer.org/t/coordinates-of-points-around-each-voxle/26250/3 "2022-11-17T18:56:01Z")

</div>

Thanks Steve for your reply.  
Zahra
