Created
August 24, 2021 22:28
-
-
Save 7marcus9/90680aeb4da211e18a8102d1bad3bc3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numStep = 360 | |
filename = "c:/tmp/screenshot_{}.png" | |
import ScreenCapture | |
cap = ScreenCapture.ScreenCaptureLogic() | |
layoutManager = slicer.app.layoutManager() | |
threeDWidget = layoutManager.threeDWidget(0) | |
threeDView = threeDWidget.threeDView() | |
threeDView.setPitchRollYawIncrement(360/numStep) | |
for i in range(numStep): | |
threeDView.yaw() | |
threeDView.forceRender() | |
cap.captureImageFromView(threeDView, filename.format(i)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment