# Alter Individual Image Slice Origins in a Node

**URL:** <https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905>\
**Category:** Support\
**Tags:** module, robotics\
**Created:** [April 1, 2021, 1:09pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905 "2021-04-01T13:09:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gabriel/32/10526_2.png) [@Gabriel](https://discourse.slicer.org/u/Gabriel)\
**Post date:** [April 1, 2021, 1:09pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/1 "2021-04-01T13:09:38Z")

</div>

Hello Everyone, I am working on a project where I will receive UltraSound images (in TIFF format). However the US images are taken from a robotic arm so will not all have the same origin or spacing between images. The origin and spacing data is encoded into the file name (using the end effector position) . Is it possible to take this information and alter individual slices’ origin and spacing?

I am very new to 3D slicer so apologies if this is trivial but I would be extremely grateful for any directions to head in.

(NB. Attempting to add these to a module but learning about that too)

---

<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 1, 2021, 5:29pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/2 "2021-04-01T17:29:46Z")

</div>

Yes, you can reconstruct volumes from arbitrarily oriented ultrasound slices, either in real-time, as the frames are required, or retrospectively from a set of recorded position-tracked ultrasound frames.

As far as I remember this video shows all the steps how to set this up, but if you have any questions then let us know:

[![](https://img.youtube.com/vi/2vXeJxYFou4/maxresdefault.jpg "Real-time 3D ultrasound reconstruction using 3D Slicer + SlicerIGT") ](https://www.youtube.com/watch?v=2vXeJxYFou4)

---

<div class="post-metadata">

**Author:** ![Gabriel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gabriel/32/10526_2.png) [@Gabriel](https://discourse.slicer.org/u/Gabriel)\
**Post date:** [April 4, 2021, 5:05pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/3 "2021-04-04T17:05:32Z")

</div>

Thank you Andras. I think perhaps I oversold how in depth I was going/ overestimated how much I could do myself!

Forgetting about the 3D model, would there be a way to simply make a volume (only thinking about slice model), where I change individual slice spacing and the x,y co-ordinate? (The yaw value/ orientation is the same for all slices)

---

<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 18, 2021, 1:49pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/4 "2021-04-18T13:49:00Z")

</div>

If you only need to shift by whole voxels and don’t need to rotate then you can get the volume as numpy array and use standard numpy array operations to shift values.

---

<div class="post-metadata">

**Author:** ![Gabriel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gabriel/32/10526_2.png) [@Gabriel](https://discourse.slicer.org/u/Gabriel)\
**Post date:** [April 19, 2021, 1:58pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/5 "2021-04-19T13:58:32Z")

</div>

I assume Slicer discourse wants to discourage simple posts of ‘thank you’ by sending me to the like button, but as I have a few questions and you seem to be incredibly helpful and engaged, I’ll say  
Thank you very much for all of your help, it’s very much appreciated that you’re taking your time to help me better understand this software. It’s exciting to learn and get to grips with what it can do.  
In future I’ll just leave the like and avoid cluttering anyone’s inbox!

---

<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 19, 2021, 2:28pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/6 "2021-04-19T14:28:47Z")

</div>

Thank you very much, it is great to hear this. It would be awesome if you could write a short post in the [Success stories](https://discourse.slicer.org/c/community/success-stories/29) category where you describe what was your task and how you could accomplish it with help of 3D Slicer and the community.

---

<div class="post-metadata">

**Author:** ![Gabriel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/gabriel/32/10526_2.png) [@Gabriel](https://discourse.slicer.org/u/Gabriel)\
**Post date:** [April 19, 2021, 2:40pm UTC](https://discourse.slicer.org/t/alter-individual-image-slice-origins-in-a-node/16905/7 "2021-04-19T14:40:00Z")

</div>

Yes I will definitely do that! I’m currently working through a particular project with a deadline of next week. Hoping to build in as much functionality as I can before then, and will write a summary of how you all have helped. Mid writing this reply someone (James Butler) has just answered a question - so quick!! So hopefully over the next week I can get a lot done and post a great success story.
