FARSIGHT HowToBuild

From FarsightWiki
(Difference between revisions)
Jump to: navigation, search
(Install CMake)
Line 1: Line 1:
== Download FARSIGHT source code ==
+
== Starting a Fresh Developer's Build==
You can check out a copy of FARSIGHT from the following location:
+
When building FARSIGHT for the first time you will need to set up a development environment. FARSIGHT utilizes several large source libraries so ensure that you have at least 15gb of HDD space. The toolkit has a SuperBuild option that automatically fetches, configures and installs the several source packages.
  
svn://www.openworld.rpi.edu/repos/farsight
+
=== Choose a Compiler For Your OS===
  
The actual source code is in the "trunk" subdirectoryIf 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.
+
Popular choices are gcc/g++ on Linux & Mac, and Microsoft Visual C++ on WindowsTo 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.
  
== Install CMake ==
+
'''Note: MSVC2010 is not currently supported by QT, If possible use MSVC2008 or earlier.'''
  
 +
=== Install CMake ===
 +
 +
CMake is used to configure FARSIGHT to be built Cross Platform with most major compilers.
 +
 
See [[FARSIGHT_Tutorials/Building_Software/Installing_CMake|Installing CMake]]
 
See [[FARSIGHT_Tutorials/Building_Software/Installing_CMake|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:
+
=== Build or install Qt ===
  
[[FARSIGHT_Tutorials/Building_Software/Building_CableSwig#Configure_and_Build|How to use CMake to configure and build CableSwig]]
+
Download a version of Qt for your platform from the [http://qt.nokia.com/downloads Qt download page].
 +
 
 +
If you are using Visual Studio on Windows you'll have to build Qt from source.  Download it from here: [http://www.qtsoftware.com/downloads/windows-cpp Qt Windows source code].
 +
 
 +
In order to compile it with VC++:
 +
*Check which version of Visual Studio you are using.
 +
*Open a Visual Studio command prompt(32 bits or 64 bits).
 +
                                                                       
 +
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 [http://www.boost.org/users/download/ the Boost download page].  Unpack it to a directory of your choosing.  You don't need to compile it.
 +
 
 +
=== Install Subversion ===
 +
SVN is a version control system used to manage the source code.
 +
 
 +
[http://tortoisesvn.net/ TortoiseSVN]Is a popular choice for Windows that integrates into the OS
 +
 
 +
Use [http://www.sliksvn.com/en/download SilkSVN] for the SuperBuild
 +
 
 +
Additional source libraries require [http://git-scm.com/ GIT]
 +
 
 +
=== 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.
  
Make sure you find the section appropriate for your operating system.
 
  
 
== SuperBuild Instructions ==
 
== SuperBuild Instructions ==
 
Superbuild requires:
 
Superbuild requires:
*SVN
 
*GIT
 
  
== Verify that you have a compiler installed ==
+
  instruction to come
 
+
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 ==
 
== Build VXL ==
Line 58: Line 94:
 
See [[FARSIGHT_Tutorials/Building_Software]] if you'd like to enable Python wrapping for ITK.
 
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 [http://qt.nokia.com/downloads Qt download page].
 
 
If you are using Visual Studio on Windows you'll have to build Qt from source.  Download it from here: [http://www.qtsoftware.com/downloads/windows-cpp 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 [http://www.boost.org/users/download/ the Boost download page].  Unpack it to a directory of your choosing.  You don't need to compile it.
 
 
 
== Build VTK ==
 
== Build VTK ==
  

Revision as of 19:48, 28 January 2011

Contents

Starting a Fresh Developer's Build

When building FARSIGHT for the first time you will need to set up a development environment. FARSIGHT utilizes several large source libraries so ensure that you have at least 15gb of HDD space. The toolkit has a SuperBuild option that automatically fetches, configures and installs the several source packages.

Choose a Compiler For Your OS

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.

Note: MSVC2010 is not currently supported by QT, If possible use MSVC2008 or earlier.

Install CMake

CMake is used to configure FARSIGHT to be built Cross Platform with most major compilers.

See Installing CMake

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++:

  • Check which version of Visual Studio you are using.
  • Open a Visual Studio command prompt(32 bits or 64 bits).

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.

Install Subversion

SVN is a version control system used to manage the source code.

TortoiseSVNIs a popular choice for Windows that integrates into the OS

Use SilkSVN for the SuperBuild

Additional source libraries require GIT

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.


SuperBuild Instructions

Superbuild requires:

instruction to come

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 , 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 FARSIGHT )

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 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