How to change render window plane programmingly?

Hi,all.
I want to change the view plane in render window using python,as marked in red box here.
image
That is to say,If I click the P-A orientation,I can get a Coronal plane of the image, I want to use few lines of code to do that.Is there any interface in Script Repository I can use?
Thank you in advance for your help!

Here’s the recipe for solving this general class of problems is described here:

https://slicer.readthedocs.io/en/latest/developer_guide/python_faq.html#how-to-find-a-python-function-for-any-slicer-features

Give that a shot and let us know if you don’t find what you need.

1 Like

Thanks,pieper.
I have tried,but still can not find the 3D pannel.What keywords in this case should I put in order to search on github repo?

See slicer source code qMRMLThreeDViewControllerWidget.cxx
slicer.app.layoutManager().threeDWidget('View1').threeDView().lookFromAxis(ctk.ctkAxesWidget.Posterior)
The above Python code can realize the functions you want.

1 Like

Thanks,Mary.
You just saved me a lot of time.