Rendering windows

Hi everyone,

I would have a question on how we can set the rendering window layer of a specific marker.
In the attached figure I have initialize 5 plane nodes with the interaction glyph visible only for the center one.
We can see that the glyph is overlayed by adjacent planes wich is not the rendering I am looking for. I would prefer to have the glyph always in the forground
One trick I have found is to create the central plane after all others. However, this cause me some troubles in my code because I initialize a lot of planes in a specific order.

Is there a way to set the rendering window layer of a specific marker directly.

Sans titre

Thanks a lot for your help,

Hi Pierre,

I have several things here I don’t understand.

So the main goal seems to be to be to interact with many planes grouped together using the glyph of the middle one. Is this correct?

And the problem is that the other planes are rendered on top of the glyph (it’s hard to see but I guess the second plane from the right is rendered above the interaction glyph). Right?

Is it important for you to use this particular glyph, or is it OK to use the one of the transforms? To test this, just create a folder in the Data module, move all planes there, and assign a transform to the folder, then show the interaction of the transform (I guess it’s possible from the right-click menu in Data module, but for sure it is from the Transforms module).

Hi Csaba,

Thank you for your reply. You are right, I could have made the figure more demontrative, but you have fully understood the problem.
I will test your proposition.

Meanwhile, I also came out with a solution:
The idea is to update the display by using something like


@Sunderlandkyl can you check if you can reproduce this (some interaction widgets in slice view appear below some markups) and if you can, then see if it is possible to fix it by tuning coincident topology offsets?

1 Like

Hi Andras,
Just to clarify, please find attached a more illustrative picture.
The rendering behavior depended also on the plane opacity and color.


HI Andreas,

I am interested to inverstigate your proposition to tune coincident topology offsets. I have several things that come into the scene (marker, glyph, segmentation) and for now the rendering is not as I would like.
Do you know how can I set different offset for different node?


We’ll fix order of widget and interaction arrows.

There is some randomness in order of actors appearing in slice views. Z order currently seem to depend on the order the actors are put in the renderer (which depends on the order nodes were added and the order of displayable managers). This randomness is certainly not ideal but users have not complained so far.

Is there any specific problem that you would like to address? Can you post screenshots?

As a workaround, you can bring any actor to the top in slice views by removing the display node from the scene and adding it back.

Thanks for your reply,

I have only a little experience in Slicer or VTK library, so my opinion has a limited relevance .
Still, It would be great if we could set the Z order of a displaynode directly from the displaynode API (of a segmentation, marker, model etc…).

I think your last point can effectively solve my rendering issue. However, (after crashing the display multiple times) I am not able to find a way to remove a specific display node (of a Markup Plane for instance) from the scene and adding it back.

Could you help me on this please ?

Can you give step-by-step instructions/code snippets of how you managed to crash the application?

It’s just that I do not know how to remove a display node from the scene and add it back. I know how to remove a node but not just the displaynode. And I can’t find a code snipped elsewhere.

I tried several things:
also thinks in class“Red”).sliceView().renderWindow()

Typically you use only one display node, so no need to worry about multiple ones. getNode("myplane").RemoveAllDisplayNodeIDs() does not remove the display nodes from the scene, only does not associate them with the data node anymore.

Instead, for each data node, call GetDisplayNode(), store the returned display node (so that it does not get deleted when it is temporarily removed from the scene), remove the display node from the scene (slicer.mrmlScene.RemoveNode), then add it back (slicer.mrmlScene.AddNode), and then associate it with the data node again (using SetAndObserveDisplayNodeID).

Thank you Andras I will look into that.


Hi Andras, hi all,
I would like to dig up this post. Is there any news on this topic ?

We don’t plan to change anything related to this in the near future. You can change the Z order of 2D actors by removing the corresponding display nodes from the scene and then re-add them in the desired order.