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

From NAMIC Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
===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:
 
<pre>%/Slicer3-SuperBuild/KWWidgets/CMake/KWWidgetsPathsMacros.cmake</pre>
 
<pre>%/Slicer3-SuperBuild/KWWidgets/CMake/KWWidgetsPathsMacros.cmake</pre>
However, this doesn't appear to have anything KWW-specific so could move to Slicer4 with some tweaks.
+
This is not available yet. Easy workaround:
 +
<pre>
 +
import os
  
=Module/Plugin Notes=
+
outfn='SetupSlicerPaths.sh'
 +
outfile = file(outfn,'w')
 +
for item in os.environ.keys():
 +
        outfile.write(item + '=' + os.environ[item] + '\n')
 +
outfile.flush()
 +
outfile.close()
 +
</pre>
 +
Then just execfile from the Slicer python shell and source SetupSlicerPaths.sh.
 +
 
 +
===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:

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