# The values in the rotation field are not saved

**URL:** <https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234>\
**Category:** Support\
**Tags:** transforms\
**Created:** [August 28, 2025, 3:01pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234 "2025-08-28T15:01:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstantin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/konstantin/32/80910_2.png) [@Konstantin](https://discourse.slicer.org/u/Konstantin)\
**Post date:** [August 28, 2025, 3:01pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/1 "2025-08-28T15:01:27Z")

</div>

Hello everyone. I have a task - to record the displacement of fragments in all planes when they move. I use the transforms module. But I encountered the following problem: all values ​​in the “rotation” field are reset to zero as soon as I click somewhere. This problem does not arise with the “translation”: all values ​​in this field are saved. How can I make the values ​​in the “ratation” field be saved (like in video guides)?

 ![2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/f/1fa645d208a6f39e9e3d9fd5b7236f9331463276.png)

 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/5/05dc9d46a280f8fe2eed499e1d525670709fd272.png)

---

<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:** [August 28, 2025, 3:09pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/2 "2025-08-28T15:09:22Z")

</div>

That’s normal and expected. The rotation sliders don’t uniquely define the transform so they are applied incrementally.

---

<div class="post-metadata">

**Author:** ![Konstantin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/konstantin/32/80910_2.png) [@Konstantin](https://discourse.slicer.org/u/Konstantin)\
**Post date:** [August 28, 2025, 3:35pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/3 "2025-08-28T15:35:56Z")

</div>

There is an example in the video instruction on YouTube where they are saved.

 ![3](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/7/67ff9675bc6ee7746c8e6c3ccfa5b12d83ebeec5.jpeg)

---

<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:** [August 28, 2025, 3:48pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/4 "2025-08-28T15:48:39Z")

</div>

That’s an older version of Slicer.

The behavior has be clarified [as described here](https://slicer.readthedocs.io/en/latest/user_guide/modules/transforms.html#:~:text=Note%253A%2520Linear%2520transform,familiar%2520with%2520it.):

- Note: Linear transform edit sliders only show relative translation and rotation because a transformation can be achieved using many different series of transforms. To make this clear to users, only one transform slider can be non-zero at a time (all previously modified sliders are reset to 0 when a slider is moved). The only exception is translation sliders in “translate first” mode (i.e., when translation in global/local coordinate system button is not depressed): in this case there is a only one way how a specific translation can be achieved, therefore transform sliders are not reset to 0. An rotating dial widget would be a more appropriate visual representation of the behavior than sliders, but slider is chosen because it is a standard widget and users are already familiar with it.

---

<div class="post-metadata">

**Author:** ![Konstantin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/konstantin/32/80910_2.png) [@Konstantin](https://discourse.slicer.org/u/Konstantin)\
**Post date:** [August 28, 2025, 4:11pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/5 "2025-08-28T16:11:42Z")

</div>

Thanks for the detailed answer. As far as I know, the widget does not show the displacement values ​​in degrees (as, for example, it happens in Autodesk Netfabb).

 ![4](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/7/676c3e771bc6a288e81270b9cc069d4cbaf47cdf.png)

 ![5](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/a/8a776665598105f30eac7de349fd7cb439d16681.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 29, 2025, 10:25am UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/6 "2025-08-29T10:25:46Z")

</div>

If you really want to get the angles for a single linear transform, you can use this python snippet

```auto
import numpy as np

def rotationMatrixToEulerZYX(R):
    if R[2,0] < 1:
        if R[2,0] > -1:
            pitch = np.arcsin(-R[2,0])
            roll = np.arctan2(R[2,1], R[2,2])
            yaw = np.arctan2(R[1,0], R[0,0])
        else:
            # R[2,0] = -1
            pitch = np.pi / 2
            roll = -np.arctan2(-R[1,2], R[1,1])
            yaw = 0
    else:
        # R[2,0] = +1
        pitch = -np.pi / 2
        roll = np.arctan2(-R[1,2], R[1,1])
        yaw = 0
    return np.degrees([roll, pitch, yaw])

m = slicer.util.arrayFromTransformMatrix(tn)

tn = getNode('Transform')
rotationMatrixToEulerZYX(m)

```

The output is an array with the angles, e.g. `array([10., 20., 30.])`

---

<div class="post-metadata">

**Author:** ![Konstantin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/konstantin/32/80910_2.png) [@Konstantin](https://discourse.slicer.org/u/Konstantin)\
**Post date:** [August 29, 2025, 4:08pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/7 "2025-08-29T16:08:02Z")

</div>

Thank you very much.

---

<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:** [August 29, 2025, 5:38pm UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/8 "2025-08-29T17:38:42Z")

</div>

If you want to avoid Python scripting, you can also use [Characterize transform matrix](https://github.com/PerkLab/SlicerSandbox?tab=readme-ov-file#characterize-transform-matrix) module (in Sandbox extension). It decomposes the transformation into a few rotations and other operations and provides a detailed description. Decompositions are always arbitrary (there are infinite ways a transform can be put together from elementary operations), but it might happen to be suitable for what you want to achieve.

---

<div class="post-metadata">

**Author:** ![Konstantin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/konstantin/32/80910_2.png) [@Konstantin](https://discourse.slicer.org/u/Konstantin)\
**Post date:** [August 30, 2025, 5:44am UTC](https://discourse.slicer.org/t/the-values-in-the-rotation-field-are-not-saved/44234/9 "2025-08-30T05:44:23Z")

</div>

### Thank you. It is very useful extension.
