# Converting 2D images with tracking information into 3D volume

**URL:** <https://discourse.itk.org/t/converting-2d-images-with-tracking-information-into-3d-volume/5032>\
**Category:** Beginner Questions\
**Created:** [May 31, 2022, 3:37pm UTC](https://discourse.itk.org/t/converting-2d-images-with-tracking-information-into-3d-volume/5032 "2022-05-31T15:37:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ale\_Ballester](https://discourse.itk.org/user_avatar/discourse.itk.org/ale_ballester/32/2707_2.png) [@Ale\_Ballester](https://discourse.itk.org/u/Ale_Ballester)\
**Post date:** [May 31, 2022, 3:37pm UTC](https://discourse.itk.org/t/converting-2d-images-with-tracking-information-into-3d-volume/5032/1 "2022-05-31T15:37:41Z")

</div>

Hi, this is my first time using this forum and I am a beginner with SimpleITK in Python.

I have a series of png ultrasound images. Each image has a corresponding (location, quaternion) data from a tracker that indicates where it was taken. Using the location data, I would like to embed each image in the corresponding location in a 3D image, and interpolate the gaps. What is the proper way to do this? My current approach is to simply calculate pixel location and paint that voxel in the 3D image with the corresponding pixel intensity. Then, I use an interpolator to try to fill in the gaps. But I am guessing there is a better way.

Thank you!

---

<div class="post-metadata">

**Author:** ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)\
**Post date:** [May 31, 2022, 3:56pm UTC](https://discourse.itk.org/t/converting-2d-images-with-tracking-information-into-3d-volume/5032/2 "2022-05-31T15:56:24Z")

</div>

Hello @Ale_Ballester,

While this can be implemented using SimpleITK, I highly recommend taking a look at the [Plus volume reconstruction](http://perk-software.cs.queensu.ca/plus/doc/nightly/user/ProcedureVolumeReconstruction.html). The [code is available on GitHub](https://github.com/PlusToolkit/PlusLib/tree/cedf60d0e1c3d009fff33f2d74c3eddeba3ca3e0/src/PlusVolumeReconstruction) if you feel you need to reimplement it.

Possibly you don’t even need to write code, use it directly from Slicer as shown in [the YouTube instructional video](https://www.youtube.com/watch?v=2vXeJxYFou4).
