Difference between revisions of "Modules:PythonScript-Documentation-3.4"

From Slicer Wiki
Jump to: navigation, search
(New page: Return to Slicer 3.4 Documentation __NOTOC__ ===Module Name=== MyModule {| |thumb|280px|Caption 1 |[[Image:screenshotBlank.png|thumb|2...)
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Documentation-3.4|Return to Slicer 3.4 Documentation]]
+
[[Documentation-3.4|Return to Slicer 3.4 Documentation]]
 +
 
 +
[[Announcements:Slicer3.4#Highlights|Gallery of New Features]]
 
__NOTOC__
 
__NOTOC__
 
===Module Name===
 
===Module Name===
MyModule
+
Python Script
 
 
{|
 
|[[Image:screenshotBlank.png|thumb|280px|Caption 1]]
 
|[[Image:screenshotBlank.png|thumb|280px|Caption 2]]
 
|[[Image:screenshotBlank.png|thumb|280px|Caption 3]]
 
|}
 
  
 
== General Information ==
 
== General Information ==
 
===Module Type & Category===
 
===Module Type & Category===
  
Type: Interactive or CLI
+
Type: CLI
  
Category: Base or (Filtering, Registration, ''etc.'')
+
Category: Python Modules
  
 
===Authors, Collaborators & Contact===
 
===Authors, Collaborators & Contact===
* Author1: Affiliation & logo, if desired
+
* Luca Antiga: Mario Negri Institute
* Contributor1: Affiliation & logo, if desired
+
* Daniel Blezek: Mayo Clinic
* Contributor2: Affiliation & logo, if desired
+
* Contact: Luca Antiga, antiga@marionegri.it
* Contact: name, email
 
  
 
===Module Description===
 
===Module Description===
Overview of what the module does goes here.
+
This Python module makes it easy to experiment with Python in Slicer without interacting with the console and without restarting Slicer when working on the code. The module is meant for experimentation and fast prototyping, and it is not recommended for deployment of full-fledged Python modules.
  
 
== Usage ==
 
== Usage ==
Line 30: Line 25:
 
===Examples, Use Cases & Tutorials===
 
===Examples, Use Cases & Tutorials===
  
* Note use cases for which this module is especially appropriate, and/or link to examples.
+
* The module is appropriate when a user wants to try out or rapidly prototype Python code in Slicer, prior to writing full-fledged modules and without need of restarting slicer in-between modifications.
* Link to examples of the module's use
+
* The recent availability of an iPython console in Slicer has made it more convenient to use the interactive console for the same tasks.
* Link to any existing tutorials
 
  
 
===Quick Tour of Features and Use===
 
===Quick Tour of Features and Use===
 
List all the panels in your interface, their features, what they mean, and how to use them. For instance:
 
List all the panels in your interface, their features, what they mean, and how to use them. For instance:
  
* '''Input panel:'''
+
* '''Python Script Parameters:'''
* '''Parameters panel:'''
+
** ''Script file'': the (text) file where the Python code is located
* '''Output panel:'''
+
* '''IO:'''
* '''Viewing panel:'''
+
** ''Input Surface'': the input surface, to be referenced as variable "inputSurface" in the Python code contained in the Script file.
 +
** ''Input Volume'': the input volume, to be referenced as variable "inputVolume" in the Python code contained in the Script file.
 +
** ''Output Surface'': the output surface, to be referenced as variable "outputSurface" in the Python code contained in the Script file.
 +
** ''Output Volume'': the output volume, to be referenced as variable "outputSurface" in the Python code contained in the Script file.
 +
 
 +
Example of Python code contained in the Script file is
 +
 
 +
outputSurface.GetPolyData().DeepCopy(inputSurface.GetPolyData())
  
 
== Development ==
 
== Development ==
Line 46: Line 47:
 
===Dependencies===
 
===Dependencies===
  
Other modules or packages that are required for this module's use.
+
Python
  
 
===Known bugs===
 
===Known bugs===
Line 60: Line 61:
 
===Source code & documentation===
 
===Source code & documentation===
  
Customize following [http://www.na-mic.org/ViewVC/index.cgi/ links] for your module.
+
Follow this [http://viewvc.slicer.org/viewcvs.cgi/trunk/Modules/Python/ link] to the module.
 
 
[http://www.na-mic.org/Slicer/Documentation/Slicer3/html/ Links] to documentation generated by doxygen.
 
  
 +
[http://www.na-mic.org/Slicer/Documentation/Slicer3-doc/html/ Links] to documentation generated by doxygen.
  
 
== More Information ==  
 
== More Information ==  
  
 
===Acknowledgment===
 
===Acknowledgment===
Include funding and other support here.
 
  
 
===References===
 
===References===
Publications related to this module go here. Links to pdfs would be useful.
 

Latest revision as of 22:25, 15 January 2010

Home < Modules:PythonScript-Documentation-3.4

Return to Slicer 3.4 Documentation

Gallery of New Features

Module Name

Python Script

General Information

Module Type & Category

Type: CLI

Category: Python Modules

Authors, Collaborators & Contact

  • Luca Antiga: Mario Negri Institute
  • Daniel Blezek: Mayo Clinic
  • Contact: Luca Antiga, antiga@marionegri.it

Module Description

This Python module makes it easy to experiment with Python in Slicer without interacting with the console and without restarting Slicer when working on the code. The module is meant for experimentation and fast prototyping, and it is not recommended for deployment of full-fledged Python modules.

Usage

Examples, Use Cases & Tutorials

  • The module is appropriate when a user wants to try out or rapidly prototype Python code in Slicer, prior to writing full-fledged modules and without need of restarting slicer in-between modifications.
  • The recent availability of an iPython console in Slicer has made it more convenient to use the interactive console for the same tasks.

Quick Tour of Features and Use

List all the panels in your interface, their features, what they mean, and how to use them. For instance:

  • Python Script Parameters:
    • Script file: the (text) file where the Python code is located
  • IO:
    • Input Surface: the input surface, to be referenced as variable "inputSurface" in the Python code contained in the Script file.
    • Input Volume: the input volume, to be referenced as variable "inputVolume" in the Python code contained in the Script file.
    • Output Surface: the output surface, to be referenced as variable "outputSurface" in the Python code contained in the Script file.
    • Output Volume: the output volume, to be referenced as variable "outputSurface" in the Python code contained in the Script file.

Example of Python code contained in the Script file is

outputSurface.GetPolyData().DeepCopy(inputSurface.GetPolyData())

Development

Dependencies

Python

Known bugs

Follow this link to the Slicer3 bug tracker.


Usability issues

Follow this link to the Slicer3 bug tracker. Please select the usability issue category when browsing or contributing.

Source code & documentation

Follow this link to the module.

Links to documentation generated by doxygen.

More Information

Acknowledgment

References