User:Inorton/Slicer4:Misc
From NAMIC Wiki
- Does the signal/slot macro method allow for global tracking of active s&s?
Contents
Paths
In Slicer3 the very useful "Slicer3SetupPaths" scripts are generated by a KWWidgets CMake macro script located here:
%/Slicer3-SuperBuild/KWWidgets/CMake/KWWidgetsPathsMacros.cmake
This is not available yet. One possibility:
import os outfn='SetupSlicerPaths.sh' outfile = file(outfn,'w') for item in os.environ.keys(): outfile.write(item + '=' + os.environ[item] + '\n') outfile.close()
Then just execfile this script from the Slicer python shell and then source SetupSlicerPaths.sh.. but this doesn't quite work because some paths are missing and there is a lot of extra stuff. Needs to be hand-edited to get all the right paths.
Module/Plugin Notes
- http://www.na-mic.org/Wiki/index.php/Events:CTK-Hackfest-2010/SlicerQtPluginArchitecture
- http://stackoverflow.com/questions/43322/whats-safe-for-a-c-plug-in-system
IPython
After sourcing the appropriate Slicer path-setup script:
python setup.py install --root=/path/to/slicer
Will set up ipython in the Slicer tree. To get readline and other system goodies I added a file called ZSyspaths.pth to Slicer/python-build/lib/python2.6/dist-packages with contents:
/usr/lib/python2.6 /usr/lib/python2.6/dist-packages/ /usr/lib/python2.6/lib-dynload /usr/lib/pymodules/python2.6 usr/lib/python2.6/lib-old /usr/lib/python2.6/plat-linux2