From SCIRun Documentation Wiki
Jump to navigation Jump to search

Building and Running SCIRun for a Windows Environment

Known bugs

First, there are a few known bugs about the Windows build, that will be resolved shortly after the release:

1) Don't build SCIRun with debug. Build with "RelWithDbgInfo" if you need to debug. Cmake generates the debug branch of SCIRun to use the debug CRT library, while none of the thirdparty libs are. That, and debug generates runtime-checking code that nobody else does, and occasionally trigger runtime-check failures.

2) If you intend on building Seg3D, you need to build a static Core with a static ITK (i.e., turn BUILD_SHARED to off). Currently there are multiply-defined-symbol issues with the ITK libs and teem libs. Also, to build SCIRun and modules, you must build a shared Core, and a shared ITK.

3) If you use MatlabInterface, the external Matlab process does not always shut down and if so, will need to be manually shut down.


Operating System

We now support SCIRun building on Windows XP.

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 FX series graphics card or an ATI Fire series gaphics card.


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.4 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.4 on your system, you should download CMake (2.4.4 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

Download SCIRun Thirdparty


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.

Note:Currently, users can not build ITK, SCIRun Core, Seg3D, and Dataflow all at the same time in windows. The following configurations are supported.

  * Build ITK, SCIRun Core and Seg3D as static libraries (no Dataflow)

  * Build ITK, SCIRun Core, and Dataflow as shared libraries (no Seg3D)

Set the following variables when configuring ITK using CMake. Note the BUILD_SHARED_LIBS value should be set according to the two configurations as discussed above:


The last line will build ITK in the Thirdparty library(substitute the location of your thirdparty library) and allow SCIRun to find it easily during the build process. Once cmake has configured, type the following sequentially to build and install ITK.

make -jx
make install -jx 

where x is set to the number of cores you have in your machine to optimize build times.

Download SCIRun

Download the official tarball release from SCIRun

Untar and unzip SCIRun.3.0.0.tar.gz

   tar xvfz SCIRun.3.0.0.tar.gz

This creates a SCIRun directory which contains the following directory structure:

   SCIRun/src = SCIRun source code
        SCIRun/thirdparty.src = SCIRun Thirdparty installation source code
        SCIRun/bin = empty directory for building SCIRun
        SCIRun/thirdparty.bin = empty directory to build SCIRun Thirdparty in

Note: for Windows users: as with Thirdparty, do not download the SCIRun directory to a path that has a space in its name.

Building SCIRun

Create a build directory in the SCIRun directory.

CMake only runs with a GUI unless using the cygwin version (not currently supported - referring to the unix build directions may be helpful here).

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.

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 solution file in Visual Studio and build the project (Select Build Solution from the Build Menu option). The libraries are now in the build/lib/ directory and the executable is in the build/bin/[debug|release]/ directory.

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 build/on-the-fly-libs/ directory.

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

Before running SCIRun, you need to have the directory containing the dependent libraries (build/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:\win-thirdparty\bin

Important: With the Windows version, you can select Debug or Release to build with. So be careful - if you build both debug and 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 ( There are two environment variables that make running these sample networks easier: SCIRUN_DATA and SCIRUN_DATASET.

SCIRUN_DATA should be set to the path where the SCIRun Data is located and will be the directory where the 'Reader' modules will default to.

To run SCIRun, double click on scirun.exe in the bin-dataflow/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".

Select File->Load from the Menu and browse to the isosurface.srn. Then click the File->Execute All option to execute the network.


CMake Variables

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

This page was last updated on 03/1/2007

Go back to Documentation:SCIRun:Installation Guide