Difference between revisions of "2008 Winter Project Week:PythonSupport"
From NAMIC Wiki
(New page: {| |thumb|320px|Return to [[2008_Winter_Project_Week ]] |valign="top"|thumb|320px|Todo |} __NOTOC__ ===Key Investigators...) |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{| | {| | ||
|[[Image:NAMIC-SLC.jpg|thumb|320px|Return to [[2008_Winter_Project_Week]] ]] | |[[Image:NAMIC-SLC.jpg|thumb|320px|Return to [[2008_Winter_Project_Week]] ]] | ||
| − | |valign="top"|[[Image: | + | |[[Image:Python-logo.png |thumb|320px|[http://www.python.org]]] |
| + | |valign="top"|[[Image:PythonModule.png |thumb|320px|Python module]] | ||
|} | |} | ||
| Line 14: | Line 15: | ||
<h1>Objective</h1> | <h1>Objective</h1> | ||
| − | + | Python has a great potential in Slicer3. Its uses span: | |
| + | * Python command line modules (advantages: easy to write, access to Python libraries, don't need a compiler to write new modules) | ||
| + | * matplotlib and scipy Python modules (they provide a matlab-like processing environment for images directly within Slicer). | ||
| + | * Python as Slicer's scripting language (for automating tasks, programmatically access modules - this is Dan's new baby! - enabling staged processing) | ||
</div> | </div> | ||
| Line 21: | Line 25: | ||
<h1>Approach, Plan </h1> | <h1>Approach, Plan </h1> | ||
| − | + | In the project week, we plan to | |
| + | * solve building issues, check stability on different platforms | ||
| + | * threading issues: modifying the MRML scene from Python command line modules in a thread-safe way | ||
| + | * stabilize calling modules from Python, write example on staged processing | ||
| + | * provide a Python equivalent to ScriptedModules | ||
| + | * define what aspects will end up in the next release | ||
| + | * propose a working set of Python command line modules (interact with Sonia's breakout session on Tuesday?) to be included in the next release | ||
| + | * write documentation on how to write Python command line modules | ||
</div> | </div> | ||
| Line 27: | Line 38: | ||
<h1>Progress</h1> | <h1>Progress</h1> | ||
| + | |||
| + | ====January 2008 Project Week==== | ||
| + | |||
| + | * Matplotlib with a Cairo backend is almost there | ||
| + | * Python command line modules now work correctly (handling arguments multiple=true has been fixed) | ||
| + | * A set of working Python command line modules has been committed | ||
| + | * Scripted modules have been extended to Python, and a sample scripted module has been written | ||
| + | * Meta-modules are now possible; the first meta-modules will be written soon | ||
====June 2007 Project Week==== | ====June 2007 Project Week==== | ||
| − | + | These are the results of the MIT project week (largely Dan's work) | |
| + | * Implemented Python Modules | ||
| + | ** Add search for Python in ModuleFactory | ||
| + | *** Can put .py files in the CommandLine Module path | ||
| + | ** Execute Python within Slicer | ||
| + | *** Full access to VTK, vtkTEEM, vtkITK, etc. | ||
| + | ** If the Python module provides an XML description, and an Execute function, will be added as a CommandLine Module | ||
| + | * ToDo | ||
| + | ** Check-in (needs USE_PYTHON guards) | ||
| + | ** Progress reporting | ||
| + | ** Simplify the API | ||
| + | ** Automate command line parsing using XML description | ||
| − | + | Later on, after the meeting | |
| − | + | * command line parsing has been completed | |
| + | * Python scripting and Python modules have been made independent of Numpy | ||
| + | * Python command line modules are now run in the main thread (allows interaction with MRML scene) | ||
| + | * a set of Python command line modules has been written | ||
</div> | </div> | ||
Latest revision as of 11:03, 14 January 2008
Home < 2008 Winter Project Week:PythonSupportReturn to 2008_Winter_Project_Week |
Key Investigators
- Mario Negri Institute: Luca Antiga
- UCSD: Bryan Smith
Objective
Python has a great potential in Slicer3. Its uses span:
- Python command line modules (advantages: easy to write, access to Python libraries, don't need a compiler to write new modules)
- matplotlib and scipy Python modules (they provide a matlab-like processing environment for images directly within Slicer).
- Python as Slicer's scripting language (for automating tasks, programmatically access modules - this is Dan's new baby! - enabling staged processing)
Approach, Plan
In the project week, we plan to
- solve building issues, check stability on different platforms
- threading issues: modifying the MRML scene from Python command line modules in a thread-safe way
- stabilize calling modules from Python, write example on staged processing
- provide a Python equivalent to ScriptedModules
- define what aspects will end up in the next release
- propose a working set of Python command line modules (interact with Sonia's breakout session on Tuesday?) to be included in the next release
- write documentation on how to write Python command line modules
Progress
January 2008 Project Week
- Matplotlib with a Cairo backend is almost there
- Python command line modules now work correctly (handling arguments multiple=true has been fixed)
- A set of working Python command line modules has been committed
- Scripted modules have been extended to Python, and a sample scripted module has been written
- Meta-modules are now possible; the first meta-modules will be written soon
June 2007 Project Week
These are the results of the MIT project week (largely Dan's work)
- Implemented Python Modules
- Add search for Python in ModuleFactory
- Can put .py files in the CommandLine Module path
- Execute Python within Slicer
- Full access to VTK, vtkTEEM, vtkITK, etc.
- If the Python module provides an XML description, and an Execute function, will be added as a CommandLine Module
- Add search for Python in ModuleFactory
- ToDo
- Check-in (needs USE_PYTHON guards)
- Progress reporting
- Simplify the API
- Automate command line parsing using XML description
Later on, after the meeting
- command line parsing has been completed
- Python scripting and Python modules have been made independent of Numpy
- Python command line modules are now run in the main thread (allows interaction with MRML scene)
- a set of Python command line modules has been written