User:Inorton/Slicer4:Misc

From NAMIC Wiki
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 script:

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 this script from the Slicer python shell and then source SetupSlicerPaths.sh.

Module/Plugin Notes