Difference between revisions of "User:Inorton/Slicer4:Misc"

From NAMIC Wiki
Jump to: navigation, search
 
Line 33: Line 33:
 
/usr/lib/python2.6/plat-linux2
 
/usr/lib/python2.6/plat-linux2
 
</pre>
 
</pre>
 
===nipype===
 

Latest revision as of 17:23, 10 November 2010

  • Does the signal/slot macro method allow for global tracking of active s&s?

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


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