FARSIGHT HowToBuild
(→Build or install Qt) |
(→Download FARSIGHT source code) |
||
Line 53: | Line 53: | ||
You can check out a copy of FARSIGHT from the following location: | You can check out a copy of FARSIGHT from the following location: | ||
− | svn://www.openworld.rpi.edu/repos/farsight | + | NEW SVN Repository is located at: |
+ | https://farsight-svn.ee.uh.edu/repos/farsight/ | ||
+ | |||
+ | The old Repository is locked to changes as of 2/17/2011 | ||
+ | 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. | 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. | ||
− | With the code downloaded the build can continue with one of the following options: | + | With the code downloaded the build can continue with one of the following options: |
== SuperBuild Instructions == | == SuperBuild Instructions == |
Revision as of 22:13, 17 February 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).
In the command prompt enter in the following commands:
configure nmake
If you are using older versions your command may have to set platform and environment:
configure -platform win32-msvc2005
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:
NEW SVN Repository is located at: https://farsight-svn.ee.uh.edu/repos/farsight/
The old Repository is locked to changes as of 2/17/2011 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.
With the code downloaded the build can continue with one of the following options:
SuperBuild Instructions
The Superbuild automates the downloading, configuring and linking of the source libraries. For new users this is recommended.
- Configure CMake
- For CMake the Source Directory Location should be set to the Superbuild sub-folder.
- Set a binary folder where ITK, VTK, and Farsight will be built.
- Configure and Generate the SuperBuild project.
- You may need to point CMake to SVN GIT QT and Boost directories if they were not added to path
- Compile Farsight
- Within the Binary folder the code will be configured for compilation (ie. a MSVC solution file)
- Build Farsight in both Debug and Release as necessary.
Manual Source Libraries Configuration
The Use of the SuperBuild CMakesList will complete all of the following for you.
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:
- configuration properties
- 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.
- It requires some type of platform specific program for creating install packages.
Note: If running the executable results in the following error: "QtGui4.dll was not found" you may need to add the QT bin directory to the system path on your OS.