# Display 3d view in a separate window

**URL:** https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236
**Category:** Development
**Created:** [August 30, 2019, 7:52am UTC](https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236 "2019-08-30T07:52:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rprueckl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rprueckl/32/4240_2.png) [@rprueckl](https://discourse.slicer.org/u/rprueckl)
#### Post date: [August 30, 2019, 7:52am UTC](https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236/1 "2019-08-30T07:52:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [August 30, 2019, 1:00pm UTC](https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236/2 "2019-08-30T13:00:31Z")

</div>

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

[https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Show\_a\_3D\_view\_outside\_the\_view\_layout](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Show_a_3D_view_outside_the_view_layout)

---

<div class="post-metadata">

### Author: ![slicer365](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer365/32/67549_2.png) [@slicer365](https://discourse.slicer.org/u/slicer365)
#### Post date: [June 10, 2021, 12:09pm UTC](https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236/3 "2021-06-10T12:09:23Z")

</div>

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.

 ![捕获.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/0/f064228e1da5622828030946f3401aba92702676.jpeg)

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [June 10, 2021, 2:55pm UTC](https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236/4 "2021-06-10T14:55:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![slicer365](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/slicer365/32/67549_2.png) [@slicer365](https://discourse.slicer.org/u/slicer365)
#### Post date: [June 10, 2021, 3:14pm UTC](https://discourse.slicer.org/t/display-3d-view-in-a-separate-window/8236/5 "2021-06-10T15:14:08Z")

</div>

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.
