# Order of transformation for model registration

**URL:** <https://discourse.slicer.org/t/order-of-transformation-for-model-registration/26102>\
**Category:** Support\
**Created:** [November 7, 2022, 7:31am UTC](https://discourse.slicer.org/t/order-of-transformation-for-model-registration/26102 "2022-11-07T07:31:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jegberink](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jegberink/32/16031_2.png) [@jegberink](https://discourse.slicer.org/u/jegberink)\
**Post date:** [November 7, 2022, 7:31am UTC](https://discourse.slicer.org/t/order-of-transformation-for-model-registration/26102/1 "2022-11-07T07:31:29Z")

</div>

Hello everyone,

I cant seem to find a definitive answer on this. I’m using ALPACA through Slicermorph to register 2 models to eachother. My question is regarding the resulting transformation. Is there and order of translation and rotation ALPACA uses, or is this irrelevant?

Thank you kindly.

---

<div class="post-metadata">

**Author:** ![jegberink](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jegberink/32/16031_2.png) [@jegberink](https://discourse.slicer.org/u/jegberink)\
**Post date:** [November 8, 2022, 10:08am UTC](https://discourse.slicer.org/t/order-of-transformation-for-model-registration/26102/2 "2022-11-08T10:08:03Z")

</div>

To elaborate. within the single transformation that happens for alpaca, does it matter if the order is XYZ, or ZYX, or any other combination.

I know that with multiple transformation rotations the rotation order matters, but is this also within a single transformation like you get from model registration?

---

<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:** [December 1, 2022, 7:48am UTC](https://discourse.slicer.org/t/order-of-transformation-for-model-registration/26102/3 "2022-12-01T07:48:12Z")

</div>

Euler angles is a very poor representation of orientation (gimbal lock issue, many variants in axis ordering, no 1-to-1 mapping between angle values and orientation, etc.), therefore we avoid this parametrization.

Probably Alpaca uses a simple 4x4 homogeneous transformation matrix representation for 3D translation and rotation.
