# How to get the position of the DICOM from the Mesh generated?

**URL:** <https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804>\
**Category:** Support\
**Tags:** dicom\
**Created:** [April 29, 2024, 3:23pm UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804 "2024-04-29T15:23:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![guilherme-francisco](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/guilherme-francisco/32/70234_2.png) [@guilherme-francisco](https://discourse.slicer.org/u/guilherme-francisco)\
**Post date:** [April 29, 2024, 3:23pm UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804/1 "2024-04-29T15:23:34Z")

</div>

I’d like to know how the 3D Slicer gets the position of the CT images from the position of the 3d model generated. Exactly like the following image:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/e/4ea0ee1e4eadb93b4f98cc111e2f3600b2974d76.jpeg)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 29, 2024, 3:37pm UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804/2 "2024-04-29T15:37:55Z")

</div>

> [@guilherme-francisco](#):
>
> I’d like to know how the 3D Slicer gets the position of the CT images from the position of the 3d model generated. Exactly like the following image:

It is the other way around. It gets the whole geometry information from the CT image, and that geometry is used for generating the model.

---

<div class="post-metadata">

**Author:** ![guilherme-francisco](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/guilherme-francisco/32/70234_2.png) [@guilherme-francisco](https://discourse.slicer.org/u/guilherme-francisco)\
**Post date:** [April 29, 2024, 4:21pm UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804/3 "2024-04-29T16:21:28Z")

</div>

Hi Murat,  
Thanks for your quick reply. I think I wasn’t clear with my question, my ultimate goal with it was to understand how to map between a certain location in 3D to the series of CT images that 3D Slicer has.  
I’m developing a virtual reality application and what I want is that when the user is inside the 3d model, they can find themselves through the series of CT images similar to what 3d Slicer does.

What is the algorithm behind this transformation (3D → 2D images)?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 29, 2024, 4:24pm UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804/4 "2024-04-29T16:24:33Z")

</div>

> [@guilherme-francisco](#):
>
> I’m developing a virtual reality application and what I want is that when the user is inside the 3d model, they can find themselves through the series of CT images similar to what 3d Slicer does.

I am still not following what you want to do, but I have no experience with VR. Regardless, you probably should start by reviewing how different types of coordinate systems are mapped to each other in Slicer.

[Coordinate systems — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/user_guide/coordinate_systems.html)

---

<div class="post-metadata">

**Author:** ![guilherme-francisco](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/guilherme-francisco/32/70234_2.png) [@guilherme-francisco](https://discourse.slicer.org/u/guilherme-francisco)\
**Post date:** [April 29, 2024, 4:39pm UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804/5 "2024-04-29T16:39:05Z")

</div>

Thank you murat!  
I will check it out

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 30, 2024, 2:34am UTC](https://discourse.slicer.org/t/how-to-get-the-position-of-the-dicom-from-the-mesh-generated/35804/6 "2024-04-30T02:34:18Z")

</div>

You can find code for napping between IJK voxel coordinates and physical RAS coordinates in the [script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#get-volume-voxel-coordinates-from-markup-control-point-ras-coordinates).

Are you using Slicer’s virtual reality extension? It can render everything that is in Slicer’s 3D view (including volume rendering, 4D animations, slice views, etc.) by a single click. Also, it is just really convenient that you can do everything - DICOM import, segmentation, quantification, surgical planning, real-time navigation, etc. - in a single environment. If you use Slicer for virtual reality then there is no need to export/import data but all data appears live in AR/VR, no need to use different programming languages (you can use Python, no need for C#), no need to redevelop all the medical imaging features in a game engine, etc.
