User:Inorton/Slicer4:Misc

From NAMIC Wiki
< User:Inorton
Revision as of 15:32, 22 October 2010 by Inorton (talk | contribs)
Jump to: navigation, search

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. Easy workaround:

import os

outfn='SetupSlicerPaths.sh'
outfile = file(outfn,'w')
for item in os.environ.keys():
        outfile.write(item + '=' + os.environ[item] + '\n')
outfile.flush()
outfile.close()

Then just execfile from the Slicer python shell and source SetupSlicerPaths.sh.

Module/Plugin Notes