Opticks Developer Guide/Getting Started

To start developing plug-ins for Opticks, you need a good understanding of how to develop C++ software using one of the C++ compilers listed below. If you need to sharpen your skills you can download one of the C++ compilers and look at free C++ online tutorials, http://www.cplusplus.com/doc/tutorial/ and http://msdn.microsoft.com/en-us/library/ms235630.aspx. Opticks also uses the Qt C++ Toolkit for much of its functionality. Qt is free for non-commercial use. You can find out information about using Qt at http://doc.trolltech.com/4.4/index.html. The free version is a little bit harder to configure, especially with Visual C++ Express, but this link has some great information about how to use Qt with Visual C++.

Once you have a good understanding of C++ and Qt, you need some basics: a computer, a C++ compiler, Python, the Opticks software, and the Opticks Software Development Kit (SDK).

The Computer
Opticks supports most modern computers running Windows XP and Windows XP x64 (64-bit windows). Opticks also supports Sun SPARC-based computers running Solaris 10. If you are going to use larger files or need support for visualization plug-ins we recommend a modern nVidia graphics card as well and Windows XP 64-bit. Below is a table showing the minimum configuration:

Opticks
If you haven't already downloaded the Opticks software, download and install the appropriate version for your computer: Windows 32-bit, Windows 64-bit, and Solaris SPARC.

The C++ Compiler
To create Opticks plug-ins you need a C++ compiler. Currently Opticks recommends Visual Studio 2005 Professional Edition for Windows and Sun Studio 10 for Solaris SPARC development. Microsoft Visual C++ 2005 Express Edition works but is more difficult to use and has limitations. Visual Studio 2005 Professional Edition usually costs around $500. Visual C++ 2005 Express Edition and Sun Studio 10 are free. Based on your computer and the cost, install one of the following C++ compilers:


 * Microsoft Visual Studio 2005 Professional Edition (Windows)
 * Download & Install Visual Studio 2005 Professional Edition 90-Day Trial
 * If you have Windows Vista, Download & Install Visual Studio 2005 Service Pack 1 Update for Windows Vista


 * Microsoft Visual C++ 2005 Express Edition (Windows)
 * Download & Install Visual C++ Express Edition
 * Download & Install Visual C++ Express Edition Service Pack 1 (VS80sp1-KB926748-X86-INTL.exe)
 * If you have Windows Vista, Download & Install Visual Studio 2005 Service Pack 1 Update for Windows Vista


 * Sun Studio 10 (Solaris SPARC)
 * Download & Install

Python
Python is a great scripting language and is necessary for multiple tasks to automate developing Opticks plug-ins.


 * Python 2.5 or higher from ActiveState - Download & Install

The Opticks Software Development Kit
The Opticks Software Development Kit (SDK) contains the libraries necessary for developing plug-ins, the source code for several sample plug-ins, and Opticks API documentation. The Windows SDK supports development for both Windows 32-bit and Windows 64-bit plug-ins.

Installation for the Windows
 * Download the Window SDK zip archive file.
 * Unzip the file into a location such as "c:\develop\opticks" using windows explorer or WinZip.
 * Download the library dependencies zip archive file.
 * Unzip the file into a location such as "c:\develop\Dependencies" using windows explorer or WinZip.
 * Open a command prompt and type "cd c:\develop\Dependencies" to change to the directory of the dependencies.
 * Type "python dependencies.py" and python will start downloading and uncompressing the dependencies.
 * Create an OPTICKSDEPENDENCIES environment variable at the Dependencies folder so the build system can find the installed dependencies.

Installation for the Solaris
 * Download the Solaris SDK bzip2 compressed tar file.
 * Decompressed the file into a location such as "~/develop/opticks".
 * Download the library dependencies zip archive file.
 * Decompressed the file into a location such as "~/develop/Dependencies".
 * Create an OPTICKSDEPENDENCIES environment variable at the Dependencies folder so the build system can find the installed dependencies.

Qt is the only dependency that is not part of the download, this is because Qt can either be licensed commercially or under the terms of the GPL license. First you need to determine if Qt will be used under the commercial or GPL license, this depends on the type of development you will be doing with Opticks. Please review the developer FAQ for Qt available at http://web.archive.org/web/20070522211033/http://trolltech.com/developer/downloads/qt/faq to determine under which license you will be using Qt.

If Qt will be used under the open-source or GPL license, follow the instructions below:
 * Download a pre-built binary of Qt 4.3.4 Open-Source edition available on the Opticks website at: https://opticks.ballforge.net/files/documents/8/112/Qt-4.3.4-opensource.zip.
 * Put the downloaded .zip file into your OPTICKSDEPENDENCIES\packages folder. This assumes you have followed the above instructions on downloading the other required dependencies for Opticks. Rename the download .zip file from Qt-4.3.4-opensource.zip to Qt-4.3.4.zip
 * Run "python dependencies.py" on the command-line. This will deploy your Qt 4.3.4 open-source edition binaries to the proper locations.

If Qt will be used under the commercial Qt license, follow the instructions below:
 * Once you have purchased a commercial license, download the Qt 4.3.4 source code binaries for the Windows platform.
 * Use the prebuilt binaries from TrollTech or follow these instructions on how to build Qt from the source code.

Forward to Concepts &rsaquo;