Getting Started¶
Welcome to SimpleITK!
SimpleITK provides a simplified interface to ITK in a variety of languages. A user can either download pre-built binaries, if they are available for the desired platform and language, or SimpleITK can be built from the source code.
In the following sections we describe how to install SimpleITK and auxiliary software tools.
After installing SimpleITK, we recommend going over the latest tutorial and skimming the Doxygen pages for more information.
Downloading the binaries¶
One of the great advantages of SimpleITK is that (typically) the user does not have to build it — he or she can simply download the binaries and get started right away!
Currently, Python binaries are available on Microsoft Windows, GNU Linux and Mac OS X. C# and Java binaries are available for Windows. R binaries are not available but a convenient devtools based installer for Linux and Mac is.
Python binary files¶
There are currently two Python binary package choices: Python Wheels, and Anaconda packages for the Anaconda Python distribution. We recommend the use of a virtual environment for installation of SimpleITK.
Wheels for Generic Python Distribution¶
From the command line use the pip program to install a binary wheel:
pip install SimpleITK
This installation requires a recent version of pip (>=9.0), to properly detect
compatibility with the PEP 427 tags in the wheel
filenames. Pip can be updated using pip install -U pip
.
Also the Python environment must be compatible with one of
the pre-compiled binary wheels.
Alternatively, the wheels can be manually downloaded from GitHub releases or PyPI, and then installed with pip.
Conda-based distributions (Anaconda, Miniconda)¶
From the command line prompt, execute:
conda install -c conda-forge simpleitk
This will install the latest version of SimpleITK that is compatible with the package versions already installed in your environment. To install the latest version of SimpleITK and update all version dependencies, execute:
conda install --update-deps -c conda-forge simpleitk
Finally, to install a specific version, for example 2.2.1, execute:
conda install -c conda-forge simpleitk=2.2.1
C# binary files¶
Binaries for select C# platforms can be found on SimpleITK’s GitHub releases under the appropriate version. Installing the library should only involve importing the unzipped files into the C# environment. The files have the following naming convention:
SimpleITK-version-CSharp-buildplatform-targetplatform.zip
e.g.
SimpleITK-1.2.4-CSharp-win64-x64.zip
Details about how to set up a C# Visual Studio project with SimpleITK can be found in the setup SimpleITK with CSharp page.
Java binary files¶
Binaries for select Java platforms can be found on SimpleITK’s GitHub releases page under the appropriate version. Installation instructions are available at setup SimpleITK with Java.
R binary files¶
R binaries are currently only available for Linux and Mac.
SimpleITK/R is installed using a devtools based installer (GitHub Repository). Strictly speaking, this is not a binary distribution, but it is a convenient way of automatically compiling and installing on a system.
This installation requires R devtools, CMake, git, and a compiler in the path.
devtools::install_github("SimpleITK/SimpleITKRInstaller")
Latest binaries¶
If the latest SimpleITK bug fixes and features are required then pre-release binaries are available. The pre-release binaries are built from the actively developed master branch. The SimpleITK packages are available on Github releases under the “latest” tag. The packages include Python, CSharp and Java. To upgrade to the latest pre-release Python binary package run:
pip install --upgrade --pre SimpleITK --find-links https://github.com/SimpleITK/SimpleITK/releases/tag/latest
Recommended Software¶
Fiji (Fiji is Just ImageJ)¶
SimpleITK has a built in function, itk::simple::Show(), which can be used for viewing images in an interactive session. By default this Show function searches for an installed Fiji to display images. If Fiji is not found, then it searches for ImageJ. Fiji/ImageJ were chosen because they can handle all the image types that SimpleITK supports, including 3D vector images with n components per pixel.
The Show function searches for Fiji/ImageJ in a number of standard locations. The exact locations depend on the system type (Linux, Mac or Windows). Enabling the “debugOn” option to “Show”, allows the user to see where SimpleITK is searching for Fiji (or other viewing application) and the actual command used to launch the viewing application.
Show is a functional interface to the ImageViewer class. Other viewing applications can be configured using an ImageViewer object, see the following section of the Frequently Asked Questions:
IPython and Jupyter¶
For python users, IPython with Jupyter is a terrific environment to perform interactive computing for image processing. The addition of the numpy and scipy packages creates a powerful interactive development environment.
We have instructional SimpleITK Jupyter Notebooks which can help a user get started.