# Transform: Extract translation only

**URL:** <https://discourse.slicer.org/t/transform-extract-translation-only/5761>\
**Category:** Support\
**Created:** [February 13, 2019, 5:40pm UTC](https://discourse.slicer.org/t/transform-extract-translation-only/5761 "2019-02-13T17:40:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miniBin](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@miniBin](https://discourse.slicer.org/u/miniBin)\
**Post date:** [February 13, 2019, 5:40pm UTC](https://discourse.slicer.org/t/transform-extract-translation-only/5761/1 "2019-02-13T17:40:21Z")

</div>

Hello is there a way to extract the translation data only from a transform matrix. I have a transform between two scans but I only need to see the translation. How do I do this? Thank you.

---

<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:** [February 13, 2019, 7:49pm UTC](https://discourse.slicer.org/t/transform-extract-translation-only/5761/2 "2019-02-13T19:49:39Z")

</div>

The translation is just the first three rows of the last column of the 4x4 matrix.

---

<div class="post-metadata">

**Author:** ![miniBin](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@miniBin](https://discourse.slicer.org/u/miniBin)\
**Post date:** [February 14, 2019, 7:26pm UTC](https://discourse.slicer.org/t/transform-extract-translation-only/5761/3 "2019-02-14T19:26:53Z")

</div>

I cannot find the transformation matrix. I used ElastiX to register two different frames.

Usually the matrix just shows up in the transforms module but it is not there?

---

<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:** [February 14, 2019, 8:56pm UTC](https://discourse.slicer.org/t/transform-extract-translation-only/5761/4 "2019-02-14T20:56:31Z")

</div>

Unfortunately, from Elastix we can only get a displacement field from Elastix. Either Elastix would need to be improved to save transform in standard ITK file format ([https://github.com/SuperElastix/elastix/issues/18](https://github.com/SuperElastix/elastix/issues/18)) or SlicerElastix module would need to be improved to be able to parse Elastix proprietary transform file format.

---

<div class="post-metadata">

**Author:** ![miniBin](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@miniBin](https://discourse.slicer.org/u/miniBin)\
**Post date:** [February 14, 2019, 9:15pm UTC](https://discourse.slicer.org/t/transform-extract-translation-only/5761/5 "2019-02-14T21:15:46Z")

</div>

No problem and thank you for the clarification! I can still play around with the displacement field for my purposes.

Many thanks.
