Table of Contents
Windows XP
ImageTracker leverages a number of open-source software packages. To build ImageTracker from source, one first needs to build these packages. The following instructions create a build of ImageTracker on a Windows XP machine using Microsoft's Visual Studio 2003 .NET.
CMAKE
CMAKE is a cross-platform, compiler-independent make system. It is available from Kitware at www.cmake.org. Download and install the latest stable release for Windows.
fftw
fftw is a fast Fourier transform library. Download the Windows DLLs from www.fftw.org. Then, follow the instructions to create "lib import libraries."
ITK
ITK is a powerful image processing and analysis library available from Kitware at www.itk.org. Download the latest source code release. Follow the instructions for using CMAKE to configure ITK for Visual Studio with the following important exceptions:
- In CMAKE, click on the "Show Advanced Values" checkbox to display advanced ITK configuration parameters
- Turn "BUILD_EXAMPLES" and "BUILD_TESTING" OFF
- Turn "USE_FFTWF" and "USE_FFTWD" ON
- Press "Configure". If you receive errors about not being able to find fftw components, fix the flagged CMake parameters by pointing to the appropriate files on your system.
- Press "Configure" and "OK" to build the Visual Studio project file
Build "Debug" (if you plan to do any development) and "Release" versions of the generated ITK solution.
VTK
VTK is a data visualization library available from Kitware at www.vtk.org. Download, configure, and build the latest source code release using CMAKE and Visual Studio, or obtain the CVS version from the VTK repositories. Build both a "Debug" and "Release" version.
wxWidgets
wxWidgets is a platform-independent graphical user interface (GUI) development library. Download and install MSW version 2.6.3 from www.wxwidgets.org. ImageTracker uses a feature of wxWidgets that is disabled by default:
- Open wx.dsw and convert to a .NET solution
- In the Solution Explorer, locate base -> Setup Headers -> setup.h. The second setup.h file is the one you want (it says "configuration for the library" at the top).
- Find
#define wxUSE_STD_IOSTREAM 0and change the 0 to 1 to enable standard C++ streams. - Build a Release version of the .NET project.
ImageTracker
The ImageTracker source is available by request or from NSRG's CVS:
- CVSROOT: /afs/cs.unc.edu/proj/stm/src/
- Repository: ImageTracker
Create an ImageTracker solution file using CMAKE. I would suggest an out-of-source build to keep the code and binaries separate. The CMakeLists.txt file provided from CVS should configure everything for you; you may need to point to the compiled ITK, VTK, wxWidgets, or fftw libraries. There is an advanced option to turn on or off building of test cases. Generate the solution file, and build the ImageTracker project! When you are done, you need to put the fftw dlls and the ImageTracker executable in the same directory.
Linux
The following instructions build ImageTracker on a new Ubuntu 7.10 (Gutsy) install.
Prerequisites
Install the following packages, e.g. with
$ sudo aptitude install package
For each package, I have included the list of dependencies that aptitude will likely automatically find.
- build-essential:
- dpkg-dev g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev patch
- libncurses5-dev:
- (required for ccmake)
- fftw3-dev:
- fftw3
- libgl1-mesa-dev:
- libx11-dev libxau-dev libxdmcp-dev mesa-common-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev
- libglu1-mesa-dev:
- libxt-dev:
- libice-dev libsm-dev
- wx2.8-headers:
- libwxgtk2.8-dev:
- libwxbase2.8-dev
- libgtk2.0-dev:
- libatk1.0-dev libcairo2-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libpango1.0-dev libpng12-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev x11proto-composite-dev x11proto-damage-dev x11proto-fixes-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev x11proto-xinerama-dev zlib1g-dev
- python-wxglade:
- libwxbase2.8-0 libwxgtk2.8-0 python-wxgtk2.8 python-wxversion
CMake
The cmake package for Ubuntu sometimes lags behind the latest release, so I suggest building from source. Download the source from www.cmake.org.
$ tar -xvf cmake-2.4.7.tar.gz
$ cd cmake-2.4.7/
$ ./bootstrap
$ make
$ sudo make install
$ cmake --version
cmake version 2.4-patch 7
InsightToolkit (ITK)
Download the latest source code release from www.itk.org. Do an out-of-source build.
$ tar xvf InsightToolkit-3.4.0.tar.gz
$ ccmake (path to itk source)/InsightToolkit-3.4.0
BUILD_EXAMPLES OFF
BUILD_TESTING OFF
USE_FFTWD ON
USE_FFTWF ON
Generate
$ make
VisualizationToolkit (VTK)
Download the latest source code from www.vtk.org. Do an out-of-source build.
$ tar xvf vtk-5.0.3.tar.gz
$ ccmake (path to vtk source)/VTK
$ make
ImageTracker
Checkout ImageTracker from CVS. Do an out-of-source build.
$ ccmake -G KDevelop3 ../../source/ImageTracker
(-G KDevelop3 generates project files for KDevelop. Optional. Make in KDevelop is not colored.)
CMAKE_BUILD_TYPE Debug (optional)
ITK_DIR path to itk
VTK_DIR path to vtk
BUILD_IT_TESTS OFF
$ make ImageTracker