Created
October 14, 2022 14:55
-
-
Save sjh26/96bd8a8f9fb878b676861cae87aa0d04 to your computer and use it in GitHub Desktop.
get active volume
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
def getActiveVolume(): | |
lm = slicer.app.layoutManager() | |
sliceLogic = lm.sliceWidget('Red').sliceLogic() | |
compositeNode = sliceLogic.GetSliceCompositeNode() | |
return compositeNode.GetBackgroundVolumeID() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment