From SCIRun Documentation Wiki
Jump to navigation Jump to search

Building and Running SCIRun for a Windows Environment

This page documents the process for building SCIRun for Windows from source. For binary releases,

Known bugs

There are a few known bugs about the Windows build:

  1. When using the MatlabInterface package, the external Matlab process does not always shut down. When this happens, you will need to shut it down manually.
  2. There is a problem with some (?) ATI graphics cards or drivers such that the video card is bypassed and it uses the windows native OpenGL version 1.1 instead. This currently only exhibits itself in Seg3D. There is a workaround. See Seg3D section below.

See Common Windows Problems for a workaround for the and solutions for other common problems.


Operating System

We currently only support the Windows XP operating system.

Graphics Card and Driver

SCIRun's rendering and visualization capabilities require OpenGL, and are supported across Windows, Linux, and Mac OSX. However, depending on the capabilities of the graphics card in your machine, you may or may not be able to use SCIRun's volume rendering algorithms, which rely on OpenGL 1.3 and require either an NVIDIA or an ATI graphics card capable of OpenGL 1.3 or greater.

Note: To run BioImage will full volume rendering capabilities, your graphics card must have shader support. One you've built SCIRun, you can run the network found in SCIRun/src/nets/volume-capability-test.srn to determine if you have support for shaders.


Install a MS compiler. This setup requires MS Visual Studio .NET 2003 or MS Visual C++ 2005 Express Edition. Cygwin or MinGW compilers are currently not supported, and earlier versions of MS Visual Studio will not work.

If you choose to install C++ Express Edition, please follow instructions 1-4 on When prompted to choose options, just accept the defaults.

A few notes on this process: 1) You must be an admin user to execute steps 1 and 2, and you need to do step 3 as the user that will use the compiler. 2) Step 1 will direct you to a page to install the compiler. That page has a link that asks you to install the "Platform SDK", and that link is the same as the above link. Just continue with step 2 on the original page. 3) On step 2, download the file PSDK-x86.exe

The Express installation (et al) will take at least 1.6 GB of disk space.

CMake (Version 2.4.7 or greater)

CMake is a cross-platform, open-source, make system tool and is required to build SCIRun. If you do not already have CMake 2.4.7 on your system, you should download CMake (2.4.7 or greater) from the CMake Install Website. You may use cmake for cygwin, but in that case you should follow the directions for running cmake in the Unix instructions. Users can download pre-built binaries for many platforms or build from source.

For more information regarding running CMake on various platforms, see the CMake documentation CMake Website

Subversion (SVN)

You only need the Subversion (svn) source code control system is you wish to checkout the latest (unstable) SCIRun development tree. Most users should download the release package from the SCI software download site.

If you would like information on using svn, click here.

Download SCIRun Thirdparty

Depending on which compiler you use, and whether you will build SCIRun debug or release, download one of the following thirdparties

Debug Thirdparty 3.1.0 for MS VS .NET 2003

Release Thirdparty 3.1.0 for MS VS .NET 2003

Debug Thirdparty 3.1.0 for MS VC 2005

Release Thirdparty 3.1.0 for MS VC 2005

Then unzip it into a directory.

Note: do NOT put Thirdparty in a location with a space in the path name. (For example, put it in c:\mystuff\ rather than in c:\Documents and Settings\).

Optional External Thirdparty: Insight Toolkit

If you want to utilize ITK in your SCIRun nets you must have a copy of ITK on your system. If you already have a version built you can point to it using cmake in the subsequent section.

To install ITK Download and unpack InsightToolkit here:

Unpack the ITK toolkit and cd into that folder. ITK uses cmake to configure itself prior to building. You can build ITK wherever you want, but a convenient place to build it is in the SCIRun Thirdparty directory.

Look here for more hints on how to install ITK for use with SCIRun, especially if you want to read Dicom files with GDCM

Once CMake has finished configuring, you will need to browse to the directory you configured ITK in, and double click on ITK.sln. This will bring up the C++ compilation environment. If you want an optimized compilation of ITK, then change the "Solution Configuration" to "Release". (In my IDE, there is a input field on the control bar (at the top) which originally said "Debug", but had a pull down menu that allowed me to select release. If you don't see this field, you can get to it by Projects->Properties. Look at the top of the dialog window that comes up.) Once you have selected your build configuration, then elect Build->Build Solution.

To enable the Insight package in SCIRun, add Insight to your LOAD_PACKAGE variable. If needed, CMake will prompt you for the value of ITK_DIR.

Download SCIRun

Download the latest verison of SCIRun from the SCI Software Download Site.

While most users should download the release package from the SCI software download site, if you wish to get the latest (unstable) SCIRun source code you must use Subversion... Click here for more information.

Building SCIRun

Create a bin directory in the SCIRun directory.

This documentation supports the GUI version of cmake. Cmake can run via command line in windows, but more information can be found on running with the non-gui version on [[1]] - under the section "Running cmake from the command line.

When you run cmake you can tell it where to find the SCIRun Thirdparty by making sure the environment variable SCIRUN_THIRDPARTY_DIR is set to point to your thirdparty build (i.e. setting it to C:/work/win-thirdparty). If you don't set the environment variable, you will initially get an error indicating the SCIRUN_THIRDPARTY_DIR is not set, and have to to set it then.

Run the cmake executable. A window will appear as shown below.


Point CMake to the SCIRun/src directory for the entry for the source code and the build directory for where to build the binaries. Click the Configure button and CMake will prompt you to select a Generator. Select either Visual Studio 7 .NET 2003 or Visual Studio 8 2005 if using Express. Click Ok.

You can set the BUILD_TYPE to Debug, Release, RelWithDebInfo, or MinSizeRel.

Variables that need to be set or haven't been passed over by an iteration of running CMake will be highlighted in red. After they have gone for one configure pass without changing, they will be highlighted in grey. Each time you change a variable, configure again by pressing 'Configure' button. Some variables are hidden to the user to make standard configures cleaner. To see these advanced variables, check the Show Advanced Values option.


Configure until the 'Ok' button becomes active, which means CMake is finished configuring.


Press the 'Ok' button and CMake will generate the Visual Studio Project files and exit out.

Open up the SCIRUN_CORE.sln (Windows defaults to not showing file extensions, so alternatively you can look for the SCIRUN_CORE file with a file type of Microsoft Visual Studio Solution) solution file in Visual Studio and build the project (Select Build Solution from the Build Menu option). After the build completes, the libraries are now in the bin/lib/ directory and the executable is in the bin/bin/[debug|release]/ directory.

CMake Variables

There are several variables available when configuring. CMake Variables gives a more detailed list of the variables and their meaning.

Running SCIRun

The scirun executable will be located in the build/bin/[debug|release] directory. Unless otherwise specified with the SCIRUN_ON_THE_FLY_LIBS_DIR variable, your dynamic compilation files will be located in the bin/on-the-fly-libs/ directory.

The scirun libraries (that the executable depends on) will be in the bin/lib/[debug|release] directory.

Before running SCIRun, you need to have the directory containing the dependent libraries (bin/lib/[debug|release]) and the Thirdparty DLLs in your PATH. (To set your PATH, open the Control Panel, click on System. In the Advanced Tab, click Environment Variables. In the System section, locate the PATH variable, and select edit.


PATH=<SYSTEM PATHS>;c:\cibc\core\lib\debug;c:\work\Win-thirdparty-opt-2003\bin

Important: If you build several versions of SCIRun (such as shared debug or static release), make sure you know what's in your path, and to remember that changes in PATH don't take effect until you restart the application you run SCIRun from (be it a folder or the Visual Studio IDE.

SCIRun ships with several sample networks. These networks depend on our SCIRun Data download (

See CIBC:Documentation:SCIRun:UserGuide:StartingSCIRun for information on starting up networks and setting up the SCIRun environment.

To run SCIRun, double click on scirun.exe in the bin/[debug|release]/ directory. Alternatively, you can select Debug->Start Without debugging from inside Visual Studio. To do this, you will first need to set SCIRun as the startup project, by right-clicking on the scirun project, right-clicking, and selecting "Set as Startup Project".

Building Seg3D

In CMake, make sure that you set the following variables (Press "Show Advanced Values"):


If you turn BUILD_SHARED_LIBS OFF, make sure you also turn BUILD_DATAFLOW OFF. Seg3D also requires ITK, and if you have already built ITK, CMake should find it automatically.

This page was last updated on 02/29/2008

Go back to Documentation:SCIRun:Installation Guide