Slicer3:Python

From NAMIC Wiki
Revision as of 13:58, 12 February 2007 by Blezek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Slicer3:Python

Python for scientific computing

Python has a fairly comprehensive package for scientific computing called SciPy. Of main interest to Slicer users/developers is NumPy. NumPy provides most of the features of the Matlab image processing toolbox and numeric computations, but in an Open Source package. A compelling reason to use NumPy is the ease of interaction and integration with Slicer3.

Slicer3 and Python

At the recent Slicer3 Mini-Retreat, a Python interpreter was added to the Slicer build. This may be built by following these steps.

  1. Install Python 2.4 or later
  2. Install NumPy, be sure to find the correct installer for your version of Python
  3. Run CMake setting the "USE_PYTHON" option, and setting the path to your Python installation
  4. Compile Slicer
    1. It is best to clean the SlicerBaseGUI project, as this may not be correctly rebuilt.
    2. A new build target SlicerGUIPython should appear

A new menu command Python Interpreter should appear on the Window menu.