Skip to content

Instantly share code, notes, and snippets.

@gortscizz
gortscizz / Full Slice Image
Created February 28, 2013 22:04
3DSlicer. Python Scripting: How to grab full slice image
"""
Originally Written Using 3DSlicer v 4.2.2-1
This script does a screen capture of every z-slice in the red slice panel of 3D slicer.
-This was originally developed to slice up volume & model data displayed together
-Slices of model data are shown after activating the display property "Slice Intersections Visible" in the model module
-You can output just volume or just model data by changing display visibility in the red slice view
-Currently no gui elements. Must hard-code variables, volname and dir, in the script below.
-Currently outputs PNG images
To change output to a different (eg. to lossless .tif) format: