Display 3d view in a separate window

Hi - I remember to read about this subject somewhere, but I am unable to find now where it was. I want to display a 3D view in a dialog (e.g. to preview an STL file to be loaded).

Is there an integrated way to create a view and connecting it to the scene without having it in a layout description? Is app->mrmlScene()->CreateNodeByClass("vtkMRMLViewNode"); enough to do that? I could then use the widget and re-parent it into my dialog. I assume that I could use the ViewNodeID property of the ModelNode to display the STL only in my view then, while hiding all other ModelNodes.

Is there also a possibility that could be considered to manage a temporary scene for the dialog to display my preview? Is this even possible without side-effects or a lot of overhead?

I would appreciate someone pointing me into the right direction regarding the approach to be used for this.

Did you find this example? I think it’s what you are looking for:


Is there any way to separate the four views from the main program?

When I use two monitors, I want one monitor to display the view separately, the toolbar and input panel are on the other monitor.

Shown as the picture.

Yes, you can click-and-drag the module panel, toolbars, etc. to move it to your other monitor.

Thank you,professor!
I know this .
I mean to move the 3D view and Red,Yellow,Green.

I want to separate the four views from the Slicer.