Transform applied to multiple volumes misbehaves when edited

When a transform is applied to more than one volume, and you then go to the Transforms module and edit it, weird things happen. When switching the presentation between the views, the transform (as applied to the volumes) changes (without changing in the module).

I did the following actions:

  • Open Slicer 5.12.4

  • Open the “Sample Data” module

  • Click “MRHead” and “MRBrainTumor1”. MRBrainTumor1 is presented in the slices.

  • Go To “Data” module

  • Right click on the right side of MRHead (the transform context menu), and pick “create new transform”

  • Move to the “Transform Hierarchy” tab, and drag MRBrainTumor1 under the transform

  • Go to the “Transforms” module. Using the “Rotation” scrollbar “IS”, rotate by 45°. The MRBrainTumor1 volume is rotated as expected.

  • Go back to the “Data” module. Click the MRHead eye to make it visible. Result:

  • Going back to the Transforms module, it still shows the 45°:

  • Now, clicking “Identity” to reset the transform:

  • And finally, “compare volumes”:

If you now return to the “conventional” view, you get the head in 45° again.

This last move seems to imply that the problem is mostly in the slice views, but that does not make it “just presentation” or “cosmetic”, because the transform is edited based on this presentation – leading to wrong transformation matrices being selected.

Thanks for the clear steps to try, that’s very helpful for troubleshooting. I tried to reproduce the issue following your steps exactly and did not see any problems in Slicer 5.10 (I haven’t upgraded yet to 5.12.4). In your first and second screenshots, it appears that the heads are rotated 90 degrees rather than 45 degrees. Is it possible you had generated two 45 degree transforms and only reset one of them to identity? That doesn’t explain your final screenshot, but the images also don’t seem to match your description of the incorrect behavior.

Thanks for taking the time to check this.

No – I had started a fresh Slicer session to make sure that the steps are exactly as I described them.

Where do you see a mismatch between my description and my images? In case that’s the issue – in the second image, I’m well aware that the head is rotated ~90°; when I say “it still shows 45°”, I’m referring to the transform as it is shown in the Transforms module.

And finally,

I did the reproduction in 5.12.4 because it is the latest released version, and also because I have an installation that is clean of extensions and other distractions – but we’ve seen similar behavior on 5.10 and 5.8.

We are producing a set of volumes in a non-standard format, which represent different measurements (analogous to T1 and T2 in an MRI), and we have an extension to load them into Slicer and tie them together to a transform so they can be manipulated together. That is the context where we first encountered the issue, so naturally the first thought was that the connection is somehow messed up; but the reproduction in a clean environment convinced us otherwise.

I wanted to attach the session log, to give more details, and then realized the installation I had used wasn’t as clean as I thought – it didn’t have our extensions, but it did have MarkupToModel and SegmentEditorExtraEffects. So I uninstalled them, and tried again, this time rotating by 30 degrees instead of 45. The misbehavior was slightly different – the transform was just “reverted” when going back to the first volume (the transform itself wasn’t changed, as you can see below, it was just visually “unapplied”).

Adding here images to verify the hierarchy situation:

  1. Clicking the transform in Data to show that it is still applied to the two volumes (and that it is the only one)

  1. Going to the Transforms module to show that it still has the 30-degree-rotation matrix

It also became visually unapplied in the other volume, when changing using the eyes in Data

And again, “compare volumes” (opening new slice views) shows things as they should be

Full session log:

Python 3.12.10 (main, Sep  9 2026, 18:32:48) [GCC 14.2.1 20250110 (Red Hat 14.2.1-7)] on linux
>>> 
[Qt] Session start time .......: 20261111_112054
[Qt] Slicer version ...........: 5.12.4 (revision 34645 / 4e21c19) linux-amd64 - installed release
[Qt] Operating system .........: Linux / 6.8.0-1064-nvidia / #67~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 17 21:53:31 UTC 2 / UTF-8 - 64-bit
[Qt] Memory ...................: 63717 MB physical, 64911 MB virtual
[Qt] CPU ......................: AuthenticAMD AMD Ryzen 7 5800H with Radeon Graphics, 8 cores, 16 logical processors
[Qt] VTK configuration ........: OpenGL2 rendering, TBB threading
[Qt] Qt configuration .........: version 5.15.2, with SSL, requested OpenGL 3.2 (core profile)
[Qt] DCMTK configuration ......: version 3.7.0, no SSL
[Qt] Internationalization .....: disabled, language=
[Qt] Developer mode ...........: enabled
[Qt] Application path .........: /home/shai/Programs/Slicer/Slicer-5.12.4-linux-amd64/bin
[Qt] Additional module paths ..: (none)
[Python] Scripted subject hierarchy plugin registered: SegmentEditor
[Python] Scripted subject hierarchy plugin registered: SegmentStatistics
[Qt] Switch to module:  "Welcome"
[Qt] Switch to module:  "SampleData"
[Python] Verifying checksum
[Python] File already exists and checksum is OK - reusing it.
[Python] Requesting load MRHead from /home/shai/.cache/slicer.org/Slicer/SlicerIO/MR-head.nrrd ...
[Qt] "Volume" Reader has successfully read the file "/home/shai/.cache/slicer.org/Slicer/SlicerIO/MR-head.nrrd" "[0.12s]"
[Python] Load finished
[Python] Verifying checksum
[Python] File already exists and checksum is OK - reusing it.
[Python] Requesting load MRBrainTumor1 from /home/shai/.cache/slicer.org/Slicer/SlicerIO/RegLib_C01_1.nrrd ...
[Qt] "Volume" Reader has successfully read the file "/home/shai/.cache/slicer.org/Slicer/SlicerIO/RegLib_C01_1.nrrd" "[0.08s]"
[Python] Load finished
[Qt] Switch to module:  "Data"
[Qt] Switch to module:  "Transforms"
[Qt] Switch to module:  "Data"
[Qt] Switch to module:  "Transforms"
[Qt] Switch to module:  "Data"
[Qt] Switch to module:  "CompareVolumes"

Ah, I think I see what’s going on. On one of the image volumes, right click in the show/hide column and uncheck “Reset view orientation on show”

While appearing like this might be a per-image setting, this is a global setting which is remembered from session to session, so you only need to do this once to make the change. After you do this, close and reopen Slicer and try your sequence of actions again, and I think Slicer will behave as you expect. What was happening was that the slice views reoriented to the current image volume when you clicked to “show” it using the eye in the Data module. So, the viewing frame of the Red, Green and Yellow slice views was rotated by 45 degrees from that point on. You can see this in your screenshots where the labels on the right-hand sides of the sliders show multiple directions instead of one (‘AR’ on the green slice, ‘LA’ on the yellow slice). If you open the dropdown menu on the slices you will also see that they say “Reformat” rather than, for example, “Coronal” or “Sagittal”.

This setting exists because in some contexts it makes more sense to orient the slice views so that the image voxel axes are aligned with the slices, and in other contexts it makes more sense to look at images sliced along a consistent world axis (this often makes more sense if multiple images with different world orientations are being examined together). For me, I am almost always considering multiple images that may not share a coordinate system, so just keeping everything in a standard RAS world orientation makes sense, so I always have this setting turned off because reorienting the slice views every time I click to view something is extremely confusing. But, if my main workflow was sequentially segmenting single image volumes, it would probably make sense to have this setting on since several of the segment editor tools work most cleanly if the voxel grid is aligned with the viewing slices.

So, I think this is not a bug in Slicer, but rather an interaction of some confusing view settings. If changing this setting doesn’t resolve the issue, please post back.

Thanks! This indeed seems to solve our problem.

I don’t recall being aware of this setting, so I suspect “on” is the default, and obviously, if so, I find this default suspicious. But at least for us, for now, just knowing about it is good enough.