Python Scripting


The Python scripting extension provides the ability to combine the power of Opticks and the Python language. This extension provides the Python scripting window which allows you use Opticks to load and visualize your imagery and then directly interface that imagery with Python and any other Python libraries from within Opticks to manipulate and perform algorithms using the full power of the Python language.

Download

Latest Stable Release

1.0.0 - March 3rd, 2010 Release Notes
Fully Supported Platforms For Python: 2.4.X 2.5.X 2.6.X
Linux 64-bit For Python (Limited Support): 2.6.X

Latest Release Candidate

1.0.1rc1 - July 23rd, 2010 Release Notes
Fully Supported Platforms For Python: 2.4.X 2.5.X 2.6.X
Linux 64-bit For Python (Limited Support): 2.6.X
1.1.0rc1 - July 23rd, 2010 Release Notes
Fully Supported Platforms For Python: 2.4.X 2.5.X 2.6.X
Linux 64-bit For Python (Limited Support): 2.6.X

Older Releases

Source Code

Summary


License: LGPL
Price: Free
Author: Opticks Team
Website: http://opticks.org/confluence/display/opticksExtras/
Latest Version: 1.1.0rc1 updated on 2010-07-23
Opticks Supported Versions:

4.4.X
4.3.X
4.2.X

Operating Systems:

Windows 32-bit
Windows 64-bit
Solaris SPARC 64-bit
Linux 64-bit

Support: Community Supported. File bug reports/enhancements/new features into Opticks Extras project.

This extension adds a new tab to the built-in scripting window in Opticks. This new tab in the scripting window allows you to write Python code from within Opticks. The extension adds approximately 9 new classes to Python to interface between Opticks and Python. This includes the ability to move Opticks image data back and forth to NumPy arrays, if NumPy is installed. It also includes the ability to create new windows in Opticks and modify what's displayed in those windows. You can also interface this extension with the built-in wizard ability of Opticks to create "one-click" buttons in Opticks that can run a very complicated Python script or series of Python scripts.

In order to fully utilize all the capabilities it is highly recommended that you also install NumPy into your Python installation. One of the easier ways to do this and get a bunch of other useful scientific and remote sensing capability for Python is to download and install the free Python(x,y) distribution.

How do I get started with Python?
  1. Make sure you have a copy of Python installed. ( If you download the extension installers for Python 2.5 or Python 2.6, they have a bundled copy of Python included. )
    • This extension currently supports Python 2.4.X, Python 2.5.X or Python 2.6.X.
  2. Download the appropriate version of the extension depending on the version of Python you wish to use. You can only install one version of the extension at a time for a given Opticks installation (for example you cannot install the version that targets Python 2.4.X and Python 2.5.X at the same time).
  3. Learn how to install Opticks extensions.
  4. Open up the "Scripting Window" in Opticks and find the "Python" tab. Start writing some Python code.
  5. If you cannot find the "Python" tab in the "Scripting Window" that might be because the extension could not locate your existing installation of Python. In this case, set the PYTHONHOME environment variable to point to your existing installation of Python.
Using the Python interface

Help on the extension is available in the Python opticks module which can be accessed by typing:

or by looking in $OPTICKS_HOME/SupportFiles/site-packages at the .py source files. Further help on the SimpleAPI interface is available in the Opticks SDK help documentation under the Simple datacentric API module. There are plans in the future to bundle html documentation along with extension.

Sample Python Scripts

Head over to Sample Python Scripts.

Screenshots and Videos


TBD.

Older Releases


Stable Releases
Currently none

Release Candidates

1.0.0rc1 - Release Notes
Fully Supported Platforms For Python: 2.4.X 2.5.X 2.6.X
Linux 64-bit For Python (Limited Support): 2.6.X

Labels

extension extension Delete
opticks43xextension opticks43xextension Delete
windows32 windows32 Delete
linux-gcc4-amd64 linux-gcc4-amd64 Delete
opticks44xextension opticks44xextension Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.