# Rotation of an object at an arbitrary pivot point

**URL:** <https://discourse.slicer.org/t/rotation-of-an-object-at-an-arbitrary-pivot-point/11170>\
**Category:** Support\
**Created:** [April 17, 2020, 11:21pm UTC](https://discourse.slicer.org/t/rotation-of-an-object-at-an-arbitrary-pivot-point/11170 "2020-04-17T23:21:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glesage](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/glesage/32/6577_2.png) [@glesage](https://discourse.slicer.org/u/glesage)\
**Post date:** [April 17, 2020, 11:21pm UTC](https://discourse.slicer.org/t/rotation-of-an-object-at-an-arbitrary-pivot-point/11170/1 "2020-04-17T23:21:28Z")

</div>

I am developing an ultrasound system with an inertial tracker attached to a linear array ultrasound probe as shown in the first figure of powerpoint and slide notes. [https://1drv.ms/p/s!Ao\_mcYEsQIFVhAKLDa4UKb8rVNFQ?e=B12guY](https://1drv.ms/p/s!Ao_mcYEsQIFVhAKLDa4UKb8rVNFQ?e=B12guY) . I am using the Witmotion inertial sensor, usb frame grabber, and the plus toolkit to acquire the image and tracking data. In slicer I can see the motion of the tracker and appropriate expected motion of the tracked image in the 3D window. I want to be able to use the probe as rectal ultrasound, with the anus as a pivot point at an arbitrary point somewhere along the probe length, which in real life experience as a retired gastroenterologist is generally true. With a fixed probe pivot point, the inertial tracker estimates both the probe translations and rotations.

My question is how to I set up transformation matrixes so that I use a fixed pivot point for the ultrasound probe as shown in my first figure. The second powerpoint slide shows the effect of a pivot point on probe and image positions as determined by the inertial tracker. I understand that rotations can be done with objects not at (0,0,0) origin using a translation of the object to origin, rotational transformation and then translation of object back to its original position. I don’t see a provision how to do this using plus toolkit and slicer. Some direction would be greatly appreciated.

I made YouTube demo for my mechanical engineer son to explain what I was doing, which shows setup for anyone who is interested. [www.youtube.com/watch?v=3ft-Hl0ToMY&feature=youtu.be](http://www.youtube.com/watch?v=3ft-Hl0ToMY&feature=youtu.be)

---

<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 17, 2020, 11:37pm UTC](https://discourse.slicer.org/t/rotation-of-an-object-at-an-arbitrary-pivot-point/11170/2 "2020-04-17T23:37:40Z")

</div>

You can set adjust the rotation point position by putting the ProbeToReference transform under a new transform (ReferenceToRAS), which contains a simple translation. Setting up appropriate transformations for your system is explained in detail in [SlicerIGT tutorials](http://www.slicerigt.org/wp/user-tutorial/).
