FARSIGHT HowToBuild

From FarsightWiki
Revision as of 15:52, 9 June 2010 by Tenickat (Talk | contribs)
Jump to: navigation, search

Contents

Download FARSIGHT source code

You can check out a copy of FARSIGHT from the following location:

svn://www.openworld.rpi.edu/repos/farsight

The actual source code is in the "trunk" subdirectory. If you're not interested in downloading test data or branch versions, you can download only the source code by appending "/trunk" to the above path.

Install CMake

See Installing CMake

If you're unfamiliar with using CMake to configure and build software, the following page contains good examples and instructions, complete with screenshots:

How to use CMake to configure and build CableSwig

Make sure you find the section appropriate for your operating system.

Verify that you have a compiler installed

Popular choices are gcc/g++ on Linux & Mac, and Microsoft Visual C++ on Windows. To install gcc on Mac OS X you may need to install the XCode development environment. This software should be available on your OS reinstall/recovery disk.

Build VXL

Download the latest stable release of VXL from Vision-something-Libraries

Run CMake and turn the following options OFF:

  • BUILD_BRL
  • BUILD_CONVERSIONS
  • BUILD_EXAMPLES
  • BUILD_GEL
  • BUILD_OUL
  • BUILD_OXL
  • BUILD_PRIP
  • BUILD_TBL
  • BUILD_TESTING

Please note for windows , the previous build to the current stable build works better(If the latest stable build is 1.14, use 1.13 if you are building on Windows , also turn BUILD_rpl off if you are using windows )

Build ITK

Download the source code from the Insight Segmentation & Registration Toolkit

Run CMake and turn the following options OFF:

  • BUILD_SHARED_LIBS
  • BUILD_TESTING
  • BUILD_EXAMPLES
  • BUILD_DOXYGEN

Set ITK_USE_SYSTEM_VXL to ON, and set VXL_DIR to your VXL binary directory.

See FARSIGHT_Tutorials/Building_Software if you'd like to enable Python wrapping for ITK.

Build or install Qt

Download a version of Qt for your platform from the Qt download page.

If you are using Visual Studio on Windows you'll have to build Qt from source. Download it from here: Qt Windows source code.

In order to compile it with VC++:

  • Open a Visual Studio command prompt.
  • Check your system if it is 32 bits or 64 bits.
  • Check which version of Visual Studio you are using.

The following commands which assume that you have VC++ 2005 on a 32 bit OS. Adjust them accordingly for your setup.

configure -platform win32-msvc2005
nmake                                                                              

Note: You may need to install and build QT first before building VTK which will require you to set some parameters like VTK_GUI_SUPPORT (Set it to ON or just check it). This will bring another parameter VTK_USE_QVTK which needs to be set to ON again. Then it will ask the desired QT version (Enter only 4 if you are downloading QT4.x.x). If you are getting "Qt was not found" message, set QT_QMAKE_EXECUTABLE to the location of qmake.exe. For example, I have it under c:\qt-win-opensource-src-4.5.1\bin\qmake.exe Configure it from CMAKE again. It should be able to find QT

Download Boost

Download the Boost C++ libraries from the Boost download page. Unpack it to a directory of your choosing. You don't need to compile it.

Build VTK

Download the source code from the VTK download page

Alternatively, you can access the latest development version of VTK using git. This will allow you to use some additional Qt views in FARSIGHT, but the git version of VTK is less stable than the latest release. Instructions on how to access the VTK git repository are on the same VTK download page linked above.

Run CMake and set the following options:

BUILD_DOCUMENTATION OFF
BUILD_EXAMPLES OFF
BUILD_SHARED_LIBS OFF
BUILD_TESTING OFF
VTK_USE_GUISUPPORT ON
VTK_USE_QT ON
VTK_USE_BOOST ON
VTK_USE_SYSTEM_JPEG OFF
VTK_USE_SYSTEM_TIFF OFF
VTK_USE_SYSTEM_ZLIB OFF

Run configure, and then set the following additional options:

Boost_INCLUDE_DIR /path/where/you/unpacked/boost
JPEG_INCLUDE_DIR /<vxl-src>/v3p/jpeg
JPEG_LIBRARY /<vxl-bin>/lib/libjpeg.*
TIFF_INCLUDE_DIR /<vxl-src>/v3p/tiff
TIFF_LIBRARY /<vxl-bin>/lib/libtiff.*
ZLIB_INCLUDE_DIR /<vxl-src>/v3p/zlib
ZLIB_LIBRARY /<vxl-bin>/lib/libzlib.*

If CMake automatically finds libraries & include directories for JPEG, TIFF, or ZLIB, you shouldn't need to change them.

Install OpenGL header files

To compile vessel segmentation you will need openGL, glext.h, and GLUT. Your platform probably comes with OpenGL. On Windows with MSVC look in a path similar to this:

C:\Program Files (x86)\Microsoft Visual Studio 8 VC\PlatformSDK\Include\gl

You can download glext.h from here: opengl.org.

Put glext.h in ../GL/ (where gl.h is).

You will need to get GLUT from here: download GLUT.

Build FARSIGHT

Run CMake and set your desired modules to ON. CMake will then tell you if you are missing any libraries. Some modules need glut. Therefore, set the desired locations properly for: GLUT_INCLUDE_DIR, (ex: C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include/gl) and GLUT_glut_LIBRARY (ex: C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include/gl/glut32.lib)

FTKImage if it fails to build go to:

  • properties
    • configuration properties
      • C/C++ and under 'Additional options:' add "/bigobj:

THE PACKAGE project does not build automatically, but can be selected and build. It requires some type of platform specific program for creating install packages. Build PACKAGE to create an install file of Farsight. Note: If running the executable results in the following error, you may need to add the QT bin directory to the system path on your OS. "QtGui4.dll was not found"

Personal tools