Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasballinger/smv
Python library for Slicer3 for scripting camera movements and taking screenshots to stitch together to make movies
https://github.com/thomasballinger/smv
Last synced: 20 days ago
JSON representation
Python library for Slicer3 for scripting camera movements and taking screenshots to stitch together to make movies
- Host: GitHub
- URL: https://github.com/thomasballinger/smv
- Owner: thomasballinger
- Created: 2011-11-07T16:57:45.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-07T20:45:18.000Z (about 13 years ago)
- Last Synced: 2024-12-16T13:43:31.096Z (26 days ago)
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
A Python module importable from Slicer3 which smoothly rotates, pans and zooms to take screenshots which can be pasted together
library for moving the camera in Slicer 3
Installation instructions:
* download smv.py
* open Slicer3
* open Python console
* add the location of the smv.py script to the Python Path:type these commands:
import sys
sys.path.append('/home/tomb/exampleFolderWhereIDownloadedTheScriptTo/')* Now type commands in this Python terminal window
Example of use:
back = -120
front = 100
from smv import *
help()
startOver()
zoom(150)
moveToSlice(back)
saveSlicePics(front - back, 200)
saveSlicePics(spot - front, 100)
saveRotatePics(45, 0, 80)
saveZoomAndPanPics(20, 30, 0, 150, 200)Dev thoughts / todos:
* This library duplicates all the coordinates code for the camera - it's all in Slicer internals somewhere, but we're keeping separate track of it)
* Doesn't behave as some users expect since camera-up is always real up. This is good for most situations, but different than manually rotating an image.