# How to display the PolyData independently?

**URL:** <https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700>\
**Category:** Support\
**Created:** [December 21, 2017, 10:03am UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700 "2017-12-21T10:03:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [December 21, 2017, 10:03am UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700/1 "2017-12-21T10:03:51Z")

</div>

Operating system: Windows 10 64bit  
Slicer version:4.9.0 2017-10-23  
Expected behavior: display the polydata independently  
Actual behavior: displayed one polydata in all of scenes.

Hi SlicerExperts,

```
I have setted the Slicer's layout with two scenes(view1,view2),then I want to draw one PolyData(rectangle) in view1,but this rectangle also showed in view2,pls see below screenshot,

```

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/b/ebf7a7ab1981549295706159ab9549290b381d02.jpeg)

```
I just want to show the created rectangle in the scene which I drawed,could you give me some suggestions ?

```

Thanks,  
Chunbo

---

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [December 21, 2017, 10:33am UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700/2 "2017-12-21T10:33:19Z")

</div>

BTW,I am using Python script to implement it.I guess there are some funtions from Slicer can set the model which added the Polydata to each view/scenes?

Thanks,  
Chunbo

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [December 21, 2017, 12:21pm UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700/3 "2017-12-21T12:21:38Z")

</div>

I assume you want to do this programmatically as well. After you get the display node for the model node (or segmentation node) using GetDisplayNode, you can change what views it appears in like this

> <https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Widgets/qMRMLDisplayNodeViewComboBox.cxx#L167-L181>

---

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [December 23, 2017, 3:05pm UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700/4 "2017-12-23T15:05:08Z")

</div>

Thanks for your answer，cpinter.

One thing is not very sure:I have two sliceWidgets(likes View1,View2),how to link the viewNode to related sliceWidgets?

Thanks,  
Chunbo

---

<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:** [December 23, 2017, 4:50pm UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700/5 "2017-12-23T16:50:17Z")

</div>

> [@spring](#):
>
> how to link the viewNode to related sliceWidgets?

See examples for that in the script repository: [Documentation/Nightly/ScriptRepository - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Accessing_views.2C_renderers.2C_and_cameras)

---

<div class="post-metadata">

**Author:** ![spring](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@spring](https://discourse.slicer.org/u/spring)\
**Post date:** [December 25, 2017, 1:22am UTC](https://discourse.slicer.org/t/how-to-display-the-polydata-independently/1700/6 "2017-12-25T01:22:09Z")

</div>

Thanks Lassoan and cpinter,

```
Merry Christmas!

```

Thanks,  
Chunbo
