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

From NAMIC Wiki
Jump to: navigation, search
Line 2: Line 2:
 
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:
 
<pre>%/Slicer3-SuperBuild/KWWidgets/CMake/KWWidgetsPathsMacros.cmake</pre>
 
<pre>%/Slicer3-SuperBuild/KWWidgets/CMake/KWWidgetsPathsMacros.cmake</pre>
This is not available yet. Easy workaround:
+
This is not available yet. Easy workaround script:
 
<pre>
 
<pre>
 
import os
 
import os
Line 13: Line 13:
 
outfile.close()
 
outfile.close()
 
</pre>
 
</pre>
Then just execfile from the Slicer python shell and source SetupSlicerPaths.sh.
+
Then just execfile this script from the Slicer python shell and then source SetupSlicerPaths.sh.
  
 
===Module/Plugin Notes===
 
===Module/Plugin Notes===
 
*http://www.na-mic.org/Wiki/index.php/Events:CTK-Hackfest-2010/SlicerQtPluginArchitecture
 
*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
 
*http://stackoverflow.com/questions/43322/whats-safe-for-a-c-plug-in-system

Revision as of 15:32, 22 October 2010

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