# Calculate axis of rotation

**URL:** <https://discourse.slicer.org/t/calculate-axis-of-rotation/15871>\
**Category:** Support\
**Tags:** registration, segmentation\
**Created:** [February 5, 2021, 9:21pm UTC](https://discourse.slicer.org/t/calculate-axis-of-rotation/15871 "2021-02-05T21:21:35Z")\
**Posts on this page:** 1\
**Showing post:** 13

<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 10, 2021, 4:03am UTC](https://discourse.slicer.org/t/calculate-axis-of-rotation/15871/13 "2021-02-10T04:03:34Z")

</div>

> [@Selva](#):
>
> When I apply the same code for this transformation matrix- Linear transform 5 in this case- All models disappear. (I have positioned my models centred on the coordinate system o, o, o)

I think, this is expected for real-life motion, where you cannot ensure that the rotation happens exactly along a single axis. In general, an orientation difference cannot be described by rotation along a single axis, but you need to rotate along two axes (or around a point). If you have several (preferably dozens) of different poses then from those you can compute an average instantaneous axis of rotation, even if there are slight additional rotations (similarly how [Pivot calibration module](https://discourse.slicer.org/t/what-is-the-algorithm-and-theory-of-spin-calibration/15434/3) computes the rotation axis in SlicerIGT extension), but I’m not sure if this can be applied to just two poses.

@mholden8 Do you have any recommendation?

---

_[View the full topic](https://discourse.slicer.org/t/calculate-axis-of-rotation/15871)._
