Difference between revisions of "Documentation/Nightly/ScriptRepository"
From Slicer Wiki
Line 9: | Line 9: | ||
==Segmentation== | ==Segmentation== | ||
* [https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/sandbox/FillRoiModule/FillRoi.py FillRoi.py]: Fill a region of interest in a labelmap volume with a constant value. This can be used after an automatic segmentation for removing certain regions of a volume. | * [https://subversion.assembla.com/svn/slicerrt/trunk/SlicerRt/sandbox/FillRoiModule/FillRoi.py FillRoi.py]: Fill a region of interest in a labelmap volume with a constant value. This can be used after an automatic segmentation for removing certain regions of a volume. | ||
+ | |||
+ | ==Filters== | ||
+ | * [https://raw.github.com/pieper/VolumeMasker/master/VolumeMasker.py VolumeMasker.py]: Update a target volume with the results of setting all input volume voxels to 0 except for those that correspond to a selected label value in an input label map (Used for example in the volume rendering in [https://www.youtube.com/watch?v=dfu2gugHLHs this video). | ||
=Community-contributed examples= | =Community-contributed examples= |
Revision as of 23:21, 2 August 2013
Home < Documentation < Nightly < ScriptRepository
For the latest Slicer documentation, visit the read-the-docs. |
Contents
Community-contributed modules
Usage: save the .py file to a directory, add the directory to the additional module paths in the Slicer application settings.
Segmentation
- FillRoi.py: Fill a region of interest in a labelmap volume with a constant value. This can be used after an automatic segmentation for removing certain regions of a volume.
Filters
- VolumeMasker.py: Update a target volume with the results of setting all input volume voxels to 0 except for those that correspond to a selected label value in an input label map (Used for example in the volume rendering in [https://www.youtube.com/watch?v=dfu2gugHLHs this video).
Community-contributed examples
Usage: Copy-paste the shown code lines or linked .py file contents into Python console in Slicer.
Capture
- Get a MRML node in the scene based on the node name and call methods of that object. For the MRHead sample data:
vol=slicer.util.getNode('MR*') vol.GetImageData().GetDimensions()
- Capture the full Slicer screen and save it into a file
img = qt.QPixmap.grabWidget(slicer.util.mainWindow()).toImage() img.save('c:/tmp/test.png')
- CaptureRotationVideo.py: Capture a video of the scene rotating in the 3D view