How to display the PolyData independently?

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

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

Thanks,
Chunbo

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

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

1 Like

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

See examples for that in the script repository: Documentation/Nightly/ScriptRepository - Slicer Wiki

1 Like

Thanks Lassoan and cpinter,

Merry Christmas!

Thanks,
Chunbo

2 Likes