Inserting an image under the interactive plot


I was wondering if there would be a way in order to get the interactive plot to work over an image. For example, to have a cartesian grid overlay a particular image such that we can plot points on particular positions on the image? Thank you in advance for your response.


Can you draw a sketch that shows what you would like to get as an end result?

So this is just a rough image I pulled off google but essentially I am asking if it would be possible to have an interactive scene where instead of having a white background, the background is actually an image of our choice with the cartesian grid on top of it. For example, can it be an ultrasound image as the background of the interactive scene and we plot points on top of it?

You need to add an actor to the VTK renderer for this.

For augmented reality applications you can display a background planar image as siren in this example:

For displaying the 3D content in immersive environment you can display a skybox:

See how to access the VTK renderer here: Script repository — 3D Slicer documentation

Alternatively, you can add lines over the 3D content using 2D actors.


Thank you so much!!! Just to confirm, this allows me to insert a 2d image as the background of the 2d interactive scene containing the cartesian grid, correct?

For reference, I am talking about changing the background on the top right scene.