I have created several 3dwidgets,and now I need to get ThreeDWidget.
I can’t get ThreeDWidget in order.
I get the name of ThreeDWidget first.The name doesn’t correspond to the ID.
But when I try to get qMRMLThreeDWidget through names,it has no return value.
The related source code of slicer as follows:
Slicer/qMRMLLayoutManager.h at main · Slicer/Slicer · GitHub
@f1oNae, have you tried with some of the snippets in the python script repository (Script repository — 3D Slicer documentation)? More precisely, the snippets in this section may help you: Access VTK rendering classes.
Let us know if this does not help you.
yeah,I Iterate through all 3D views in current layout,finally find that the real name of the 3DWidget is “View1”-“View16” instead of “ThreeDWidgetX”!!!
Thanks for your help!