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

From NAMIC Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
*Does the signal/slot macro method allow for global tracking of active s&s?
 +
 
===Paths===
 
===Paths===
 
In Slicer3 the very useful "Slicer3SetupPaths" scripts are generated by a KWWidgets CMake macro script located here:
 
In Slicer3 the very useful "Slicer3SetupPaths" scripts are generated by a KWWidgets CMake macro script located here:
Line 10: Line 12:
 
for item in os.environ.keys():
 
for item in os.environ.keys():
 
         outfile.write(item + '=' + os.environ[item] + '\n')
 
         outfile.write(item + '=' + os.environ[item] + '\n')
outfile.flush()
 
 
outfile.close()
 
outfile.close()
 
</pre>
 
</pre>

Revision as of 04:21, 23 October 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. 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.close()

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

Module/Plugin Notes