Link a transform's visibility to transformed volume visibility

shai-ikko
Thu, 25 Dec 2025 14:57:14 +0000
Support

Hi,

In my application, I want to load a volume, and give the user controls to spin it around. So when I load the volume, I also create a Transform, make the volume observe it, and then call transformNode.GetDisplayNode().SetEditorVisibility(True). This puts very handy controls for rotations and translations (shifts in space) in all slice views and the 3D views, and yay! As long as I’m considering only this volume, all is peachy.

But if I now try to repeat the process, and load another volume the same way, the first transform is still visible for editing – although it does not even affect the shown volume. Now there are double controls; you can’t tell visually which is the “current” one, you can only fix this by non-obvious manipulations.

For very simple use, I guess I could listen for changes in the Selection Node, but when the use becomes more involved (comparisons, or putting one volume in background and one in foreground) that becomes useless.

Is there a (preferably easy) way I’m missing, to say “show this Transform only with observing volumes”?

Thanks!

6 posts - 3 participants