Build in Linux

From BioImageXD Wiki
(Difference between revisions)
Jump to: navigation, search
 
(16 intermediate revisions by one user not shown)
Line 1: Line 1:
These instructions give details how we build all necessary libraries and setup BioImageXD in Linux. Same instructions have been used in Ubuntu and Fedora distros, and most likely work in other distros as well. In some cases there might be some libraries not installed that are needed to build VTK/ITK libraries. Those errors are reported by CMake. If you cannot find correct library to install, contact info@bioimagexd.net. In most cases, only packages mentioned in prerequisites are needed. Whole process takes full day (about 8h), but gladly computer will do most of the job.
+
These instructions give details how we build all necessary libraries and setup BioImageXD in Linux. Same instructions have been used in Ubuntu and Fedora distros, and most likely work in other distros as well. In some cases there might be some libraries not installed that are needed to build VTK/ITK libraries. Those errors are reported by CMake. If you cannot find correct library to install, contact info@bioimagexd.net. In most cases, only packages mentioned in prerequisites are needed. Whole process takes full day (about 8h), but gladly computer will do most of the work.
  
Prerequisite:
+
'''Prerequisites:'''
 
* Python 2.6 (2.7 might also work, but haven't been tested in Linux), http://www.python.org
 
* Python 2.6 (2.7 might also work, but haven't been tested in Linux), http://www.python.org
 
* wxPython 2.8.x (2.9.x might also work, but haven't been tested in Linux), http://www.wxpython.org/
 
* wxPython 2.8.x (2.9.x might also work, but haven't been tested in Linux), http://www.wxpython.org/
 
* CMake 2.6 or newer, http://www.cmake.org
 
* CMake 2.6 or newer, http://www.cmake.org
* SWIG 1.3.38 or newer (2.x.x series haven't been tested)
+
* SWIG 1.3.38 or newer (2.x.x series haven't been tested), http://www.swig.org/
 
* Subversion client
 
* Subversion client
  
Building VTK
+
 
 +
== Building VTK ==
 +
 
 
# Download VTK 5.6.1 (or newer, might work, but no guarantees), http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz
 
# Download VTK 5.6.1 (or newer, might work, but no guarantees), http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz
 
# Extract package
 
# Extract package
 
# Go to directory where you extracted VTK source and issue command 'ccmake .'
 
# Go to directory where you extracted VTK source and issue command 'ccmake .'
 
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
 
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
BUILD_SHARED_LIBS: ON
+
#: <code>BUILD_SHARED_LIBS: ON</code>
BUILD_TESTING: OFF (you can leave it ON if you want, increases compilation time)
+
#: <code>BUILD_TESTING: OFF</code>
CMAKE_BUILD_TYPE: Release
+
#: <code>CMAKE_BUILD_TYPE: Release</code>
CMAKE_INSTALL_PREFIX: Change to somewhere where you have write access if you don't have admin rights
+
#: <code>CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights</code>
VTK_USE_PARALLEL: ON
+
#: <code>VTK_USE_PARALLEL: ON</code>
VTK_WRAP_PYTHON: ON
+
#: <code>VTK_WRAP_PYTHON: ON</code>
 
# Click 'c' to configure and set
 
# Click 'c' to configure and set
VTK_USE_TK: OFF
+
#: <code>VTK_USE_TK: OFF</code>
 
# Click 'c' to configure and 'g' to generate and exit
 
# Click 'c' to configure and 'g' to generate and exit
 
# Issue command 'make', get a cup of coffee and wait about 30-60 minutes for VTK to get build
 
# Issue command 'make', get a cup of coffee and wait about 30-60 minutes for VTK to get build
# Set ${VTK_INSTALL_DIR}/lib/python2.6/site-packages/ to PYTHONPATH so you can install VTK correctly, if you are installing VTK outside path
+
# Set <code>${VTK_INSTALL_DIR}/lib/python2.6/site-packages/</code> to <code>PYTHONPATH</code> so you can install VTK correctly, if you are installing VTK outside path
# Issue command 'make install' to install built VTK to directory defined in CMAKE_INSTALL_PREFIX
+
# Issue command 'make install' to install built VTK to directory defined in <code>CMAKE_INSTALL_PREFIX</code>
 +
 
 +
 
 +
== Building ITK ==
 +
 
 +
# Download ITK 3.20.1 (ITK 4.x.x will not work, we'll update this guide when we move to ITK 4), http://sourceforge.net/projects/itk/files/itk/3.20/InsightToolkit-3.20.1.tar.gz/download
 +
# Extract package
 +
# Go to directory where you extracted ITK source and issue command 'ccmake .'
 +
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
 +
#: <code>BUILD_EXAMPLES: OFF</code>
 +
#: <code>BUILD_SHARED_LIBS: ON</code>
 +
#: <code>BUILD_TESTING: OFF</code>
 +
#: <code>CMAKE_BUILD_TYPE: Release</code>
 +
#: <code>CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights</code>
 +
#: <code>ITK_USE_OPTIMIZED_REGISTRATION: ON</code>
 +
#: <code>ITK_USE_REVIEW: ON</code>
 +
#: <code>ITK_USE_REVIEW_STATISTICS: ON</code>
 +
# Click 'c' to configure (don't care about attentions) and 'g' to generate and exit
 +
# Issue command 'make', get another cup of coffee and wait about 10 minutes for ITK to get build
 +
# Issue command 'make install' to install built ITK to directory defined in <code>CMAKE_INSTALL_PREFIX</code>
 +
 
 +
 
 +
== Building CableSwig (needed for wrapITK) ==
 +
 
 +
# Download CableSwig-ITK 3.20.0, http://voxel.dl.sourceforge.net/sourceforge/itk/CableSwig-ITK-3.20.0.tar.gz
 +
# Extract package
 +
# Go to directory where you extracted CableSwig source and issue command 'ccmake .'
 +
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
 +
#: <code>CMAKE_BUILD_TYPE: Release</code>
 +
#: <code>CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights</code>
 +
# Click 'c' to configure and 'g' to generate and exit
 +
# Issue command 'make', get another cup of coffee and wait about 5 minutes for CableSwig to get build
 +
# Issue command 'make install' to install built CableSwig to directory defined in <code>CMAKE_INSTALL_PREFIX</code>
 +
 
 +
 
 +
== Building wrapITK (the long-lasting part) ==
 +
 
 +
# Create directory for wrapITK source
 +
# Go to directory and fetch sources using command 'svn checkout http://wrapitk.googlecode.com/svn/branches/maint .'
 +
# Issue command 'ccmake .'
 +
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error):
 +
#: <code>BUILD_TESTING: OFF (you can leave it ON if you want, increases compilation time)</code>
 +
#: <code>CMAKE_BUILD_TYPE: Release</code>
 +
#: <code>CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights</code>
 +
#: <code>ITK_DIR: Set to root directory of your ITK sources</code>
 +
#: <code>WRAP_double: ON</code>
 +
#: <code>WRAP_unsigned_char: ON</code>
 +
#: <code>WRAP_unsigned_long: ON</code>
 +
# Click 'c' to configure (don't care about possible errors) and set
 +
#: <code>CableSwig_DIR: Set to root directory of your CableSwig sources</code>
 +
#: <code>WRAP_ITK_PYTHON: ON</code>
 +
#: <code>INSTALL_WRAP_ITK_COMPATIBILITY: OFF (if you don't have admin rights)</code>
 +
# Click 'c' to configure, nothing to set so click 'c' to configure again, and 'g' to generate and exit
 +
# Issue command 'make'. Since you have now drinked 3 cups of coffee you might not feel like having a lunch right now. Go for nice 30-60 minutes walk outside. After that you can have lunch or dinner. Then wait a while for building of wrapITK to finish. It will take about 3-5 hours.
 +
# Issue command 'make install' to install built wrapITK to directory defined in <code>CMAKE_INSTALL_PREFIX</code>
 +
# Go into directory ${wrapITK_source}/ExternalProjects/ItkVtkGlue
 +
# Issue command 'ccmake .'
 +
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing <code>ITK_DIR</code> error):
 +
#: <code>BUILD_WRAPPERS: ON</code>
 +
#: <code>CMAKE_BUILD_TYPE: Release</code>
 +
#: <code>CMAKE_INSTALL_PREFIX: Same as selected for wrapITK</code>
 +
#: <code>ITK_DIR: Set to root directory of ITK sources</code>
 +
#: <code>LIBRARY_OUTPUT_PATH: Same as selected for wrapITK</code>
 +
# Click 'c' to configure (don't care about possible errors) and set
 +
#: <code>VTK_DIR: Set to root directory of VTK sources</code>
 +
# Click 'c' to configure and set
 +
#: <code>WrapITK_DIR: Set to root directory of wrapITK sources</code>
 +
# Click 'c' to configure, and 'g' to generate and exit
 +
# Issue command 'make'
 +
# Issue command 'make install'
 +
 
 +
 
 +
== Get BioImageXD sources and build vtkBXD and itkBXD ==
  
Building ITK
+
# Create directory for BioImageXD sources and fetch sources using command 'svn co https://bioimagexd.svn.sourceforge.net/svnroot/bioimagexd/bioimagexd/trunk .'
1. Download ITK 3.20.1 (ITK 4.x.x will not work, we'll updated this guide when we move to ITK 4), http://sourceforge.net/projects/itk/files/itk/3.20/InsightToolkit-3.20.1.tar.gz/download
+
# Go into directory ${BXD_SOURCE}/vtkBXD
2. Extract package
+
# Issue command 'ccmake .'
3. Go to directory where you extracted ITK source and issue command 'ccmake .'
+
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors):
4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
+
#: <code>CMAKE_BUILD_TYPE: Release</code>
BUILD_EXAMPLES: OFF (you can leave it ON if you want, increases compilation time)
+
#: <code>CMAKE_INSTALL_PREFIX: Same as selected for VTK</code>
BUILD_SHARED_LIBS: ON
+
#: <code>VTK_DIR: Set to root directory of VTK sources</code>
BUILD_TESTING: OFF (you can leave it ON if you want, increases compilation time)
+
# Click 'c' to configure, 'c' to configure, and 'g' to generate and exit
CMAKE_BUILD_TYPE: Release
+
# Issue command 'make'
CMAKE_INSTALL_PREFIX: Change to somewhere where you have write access if you don't have admin rights
+
# Issue command 'make install'
ITK_USE_OPTIMIZED_REGISTRATION: ON
+
# Go into directory ${BXD_SOURCE}/itkBXD
ITK_USE_REVIEW: ON
+
# Issue command 'ccmake .'
ITK_USE_REVIEW_STATISTICS: ON
+
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors):
5. Click 'c' to configure (don't care about attentions) and 'g' to generate and exit
+
#: <code>CMAKE_BUILD_TYPE: Release</code>
6. Issue command 'make', get another cup of coffee and wait about 10 minutes for ITK to get build
+
#: <code>CMAKE_INSTALL_PREFIX: Same as selected for wrapITK</code>
7. Issue command 'make install' to install built ITK to directory defined in CMAKE_INSTALL_PREFIX
+
#: <code>ITK_DIR: Set to root directory of ITK sources</code>
 +
#: <code>WrapITK_DIR: Set to root directory of wrapITK sources</code>
 +
#: <code>LIBRARY_OUTPUT_PATH: Same as selected for wrapITK</code>
 +
# Click 'c' to configure, 'c' to configure and 'g' to generate and exit
 +
# Issue command 'make'
 +
# Issue command 'make install'
  
Building CableSwig (needed for wrapITK)
 
1. Download CableSwig-ITK 3.20.0, http://voxel.dl.sourceforge.net/sourceforge/itk/CableSwig-ITK-3.20.0.tar.gz
 
2. Extract package
 
3. Go to directory where you extracted CableSwig source and issue command 'ccmake .'
 
4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
 
CMAKE_BUILD_TYPE: Release
 
CMAKE_INSTALL_PREFIX: Change to somewhere where you have write access if you don't have admin rights
 
5. Click 'c' to configure and 'g' to generate and exit
 
6. Issue command 'make', get another cup of coffee and wait about 5 minutes for CableSwig to get build
 
7. Issue command 'make install' to install built ITK to directory defined in CMAKE_INSTALL_PREFIX
 
  
Building wrapITK (the long-lasting part)
+
== Final setup ==
1. Create directory for wrapITK source
+
2. Go to directory and fetch sources using command 'svn checkout http://wrapitk.googlecode.com/svn/branches/maint .'
+
3. Issue command 'ccmake .'
+
4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error):
+
BUILD_TESTING: OFF (you can leave it ON if you want, increases compilation time)
+
CMAKE_BUILD_TYPE: Release
+
CMAKE_INSTALL_PREFIX: Change to somewhere where you have write access if you don't have admin rights
+
ITK_DIR: Set to root directory of your ITK sources
+
WRAP_unsigned_char: ON
+
WRAP_unsigned_long: ON
+
5. Click 'c' to configure (don't care about possible errors) and set
+
CableSwig_DIR: Set to root directory of your CableSwig sources
+
WRAP_ITK_PYTHON: ON
+
INSTALL_WRAP_ITK_COMPATIBILITY: OFF (if you don't have admin rights)
+
6. Click 'c' to configure, nothing to set so click 'c' to configure again, and 'g' to generate and exit
+
7. Issue command 'make'. Since you have now drinked 3 cups of coffee you might not feel like having a lunch right now. Go for nice 30-60 minutes walk outside. After that you can have lunch or dinner. Then wait a while for building of wrapITK to finish. It will take about 3-5 hours.
+
8. Issue command 'make install' to install built wrapITK to directory defined in CMAKE_INSTALL_PREFIX
+
9. Go into directory ${wrapITK_source}/ExternalProjects/ItkVtkGlue
+
10. Issue command 'ccmake .'
+
11. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error):
+
BUILD_WRAPPERS: ON
+
CMAKE_BUILD_TYPE: Release
+
CMAKE_INSTALL_PREFIX: Same as selected for wrapITK
+
ITK_DIR: Set to root directory of ITK sources
+
LIBRARY_OUTPUT_PATH: Same as selected for wrapITK
+
12. Click 'c' to configure (don't care about possible errors) and set
+
VTK_DIR: Set to root directory of VTK sources
+
13. Click 'c' to configure and set
+
WrapITK_DIR: Set to root directory of wrapITK sources
+
14. Click 'c' to configure, and 'g' to generate and exit
+
15. Issue command 'make'
+
16. Issue command 'make install'
+
  
Get BioImageXD sources and build vtkBXD and itkBXD
 
1. Create directory for BioImageXD sources and fetch sources using command 'svn co https://bioimagexd.svn.sourceforge.net/svnroot/bioimagexd/bioimagexd/trunk .'
 
2. Go into directory ${BXD_source}/vtkBXD
 
3. Issue command 'ccmake .'
 
4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors):
 
CMAKE_BUILD_TYPE: Release
 
CMAKE_INSTALL_PREFIX: Same as selected for VTK
 
VTK_DIR: Set to root directory of VTK sources
 
5. Click 'c' to configure, 'c' to configure, and 'g' to generate and exit
 
6. Issue command 'make'
 
7. Issue command 'make install'
 
8. Go into directory ${BXD_source}/itkBXD
 
9. Issue command 'ccmake .'
 
10. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors):
 
CMAKE_BUILD_TYPE: Release
 
CMAKE_INSTALL_PREFIX: Same as selected for wrapITK
 
ITK_DIR: Set to root directory of ITK sources
 
WrapITK_DIR: Set to root directory of wrapITK sources
 
LIBRARY_OUTPUT_PATH: Same as selected for wrapITK
 
11. Click 'c' to configure, 'c' to configure and 'g' to generate and exit
 
12. Issue command 'make'
 
13. Issue command 'make install'
 
  
Now you can go to root of BioImageXD source and launch BioImageXD by 'python BioImageXD.py'. Depending where you installed libraries, you might need to set PYTHONPATH and/or LD_LIBRARY_PATH. You might even want to set path to you shared libraries to /etc/ld.so.conf.d if your built libs aren't in path already, and you have permission to write to /etc/ld.so.conf.d. If you don't have any additional rights and you have build BioImageXD outside any previously defined paths, you can set PYTHONPATH and LD_LIBRARY_PATH as (notice building of VTK, part 8):
+
Now you can go to root of BioImageXD source and launch BioImageXD by 'python BioImageXD.py'. Depending where you installed libraries, you might need to set PYTHONPATH and/or LD_LIBRARY_PATH. You might even want to set path to your shared libraries to /etc/ld.so.conf.d if your built libs aren't in path already, and you have permission to write to /etc/ld.so.conf.d. If you don't have any additional rights and you have built BioImageXD outside any previously defined paths, you can set PYTHONPATH and <code>LD_LIBRARY_PATH</code> as (notice building of VTK, part 8):<br/><code>
PYTHONPATH=${VTK_INSTALL_PATH}/lib/python2.6/site-packages/VTK-5.6.1-py2.6.egg/:${VTK_INSTALL_PATH}/lib/python2.6/site-packages/:${WRAPITK_SOURCE}/Languages/Python/:${WRAPITK_INSTALL_PATH}/lib/InsightToolkit/WrapITK/Python
+
PYTHONPATH=${VTK_INSTALL_PATH}/lib/python2.6/site-packages/VTK-5.6.1-py2.6.egg/:${VTK_INSTALL_PATH}/lib/python2.6/site-packages/:${WRAPITK_SOURCE}/Languages/Python/:${WRAPITK_INSTALL_PATH}/lib/InsightToolkit/WrapITK/Python<br/>
 
LD_LIBRARY_PATH=${VTK_INSTALL_PATH}/lib/vtk-5.6/:${VTK_INSTALL_PATH}/lib/:${ITK_INSTALL_PATH}/lib/InsightToolkit
 
LD_LIBRARY_PATH=${VTK_INSTALL_PATH}/lib/vtk-5.6/:${VTK_INSTALL_PATH}/lib/:${ITK_INSTALL_PATH}/lib/InsightToolkit
 +
</code>

Latest revision as of 09:10, 5 July 2012

These instructions give details how we build all necessary libraries and setup BioImageXD in Linux. Same instructions have been used in Ubuntu and Fedora distros, and most likely work in other distros as well. In some cases there might be some libraries not installed that are needed to build VTK/ITK libraries. Those errors are reported by CMake. If you cannot find correct library to install, contact info@bioimagexd.net. In most cases, only packages mentioned in prerequisites are needed. Whole process takes full day (about 8h), but gladly computer will do most of the work.

Prerequisites:


Contents

Building VTK

  1. Download VTK 5.6.1 (or newer, might work, but no guarantees), http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz
  2. Extract package
  3. Go to directory where you extracted VTK source and issue command 'ccmake .'
  4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
    BUILD_SHARED_LIBS: ON
    BUILD_TESTING: OFF
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights
    VTK_USE_PARALLEL: ON
    VTK_WRAP_PYTHON: ON
  5. Click 'c' to configure and set
    VTK_USE_TK: OFF
  6. Click 'c' to configure and 'g' to generate and exit
  7. Issue command 'make', get a cup of coffee and wait about 30-60 minutes for VTK to get build
  8. Set ${VTK_INSTALL_DIR}/lib/python2.6/site-packages/ to PYTHONPATH so you can install VTK correctly, if you are installing VTK outside path
  9. Issue command 'make install' to install built VTK to directory defined in CMAKE_INSTALL_PREFIX


Building ITK

  1. Download ITK 3.20.1 (ITK 4.x.x will not work, we'll update this guide when we move to ITK 4), http://sourceforge.net/projects/itk/files/itk/3.20/InsightToolkit-3.20.1.tar.gz/download
  2. Extract package
  3. Go to directory where you extracted ITK source and issue command 'ccmake .'
  4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
    BUILD_EXAMPLES: OFF
    BUILD_SHARED_LIBS: ON
    BUILD_TESTING: OFF
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights
    ITK_USE_OPTIMIZED_REGISTRATION: ON
    ITK_USE_REVIEW: ON
    ITK_USE_REVIEW_STATISTICS: ON
  5. Click 'c' to configure (don't care about attentions) and 'g' to generate and exit
  6. Issue command 'make', get another cup of coffee and wait about 10 minutes for ITK to get build
  7. Issue command 'make install' to install built ITK to directory defined in CMAKE_INSTALL_PREFIX


Building CableSwig (needed for wrapITK)

  1. Download CableSwig-ITK 3.20.0, http://voxel.dl.sourceforge.net/sourceforge/itk/CableSwig-ITK-3.20.0.tar.gz
  2. Extract package
  3. Go to directory where you extracted CableSwig source and issue command 'ccmake .'
  4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure):
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights
  5. Click 'c' to configure and 'g' to generate and exit
  6. Issue command 'make', get another cup of coffee and wait about 5 minutes for CableSwig to get build
  7. Issue command 'make install' to install built CableSwig to directory defined in CMAKE_INSTALL_PREFIX


Building wrapITK (the long-lasting part)

  1. Create directory for wrapITK source
  2. Go to directory and fetch sources using command 'svn checkout http://wrapitk.googlecode.com/svn/branches/maint .'
  3. Issue command 'ccmake .'
  4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error):
    BUILD_TESTING: OFF (you can leave it ON if you want, increases compilation time)
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Change to some location where you have write access if you don't have admin rights
    ITK_DIR: Set to root directory of your ITK sources
    WRAP_double: ON
    WRAP_unsigned_char: ON
    WRAP_unsigned_long: ON
  5. Click 'c' to configure (don't care about possible errors) and set
    CableSwig_DIR: Set to root directory of your CableSwig sources
    WRAP_ITK_PYTHON: ON
    INSTALL_WRAP_ITK_COMPATIBILITY: OFF (if you don't have admin rights)
  6. Click 'c' to configure, nothing to set so click 'c' to configure again, and 'g' to generate and exit
  7. Issue command 'make'. Since you have now drinked 3 cups of coffee you might not feel like having a lunch right now. Go for nice 30-60 minutes walk outside. After that you can have lunch or dinner. Then wait a while for building of wrapITK to finish. It will take about 3-5 hours.
  8. Issue command 'make install' to install built wrapITK to directory defined in CMAKE_INSTALL_PREFIX
  9. Go into directory ${wrapITK_source}/ExternalProjects/ItkVtkGlue
  10. Issue command 'ccmake .'
  11. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error):
    BUILD_WRAPPERS: ON
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Same as selected for wrapITK
    ITK_DIR: Set to root directory of ITK sources
    LIBRARY_OUTPUT_PATH: Same as selected for wrapITK
  12. Click 'c' to configure (don't care about possible errors) and set
    VTK_DIR: Set to root directory of VTK sources
  13. Click 'c' to configure and set
    WrapITK_DIR: Set to root directory of wrapITK sources
  14. Click 'c' to configure, and 'g' to generate and exit
  15. Issue command 'make'
  16. Issue command 'make install'


Get BioImageXD sources and build vtkBXD and itkBXD

  1. Create directory for BioImageXD sources and fetch sources using command 'svn co https://bioimagexd.svn.sourceforge.net/svnroot/bioimagexd/bioimagexd/trunk .'
  2. Go into directory ${BXD_SOURCE}/vtkBXD
  3. Issue command 'ccmake .'
  4. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors):
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Same as selected for VTK
    VTK_DIR: Set to root directory of VTK sources
  5. Click 'c' to configure, 'c' to configure, and 'g' to generate and exit
  6. Issue command 'make'
  7. Issue command 'make install'
  8. Go into directory ${BXD_SOURCE}/itkBXD
  9. Issue command 'ccmake .'
  10. Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors):
    CMAKE_BUILD_TYPE: Release
    CMAKE_INSTALL_PREFIX: Same as selected for wrapITK
    ITK_DIR: Set to root directory of ITK sources
    WrapITK_DIR: Set to root directory of wrapITK sources
    LIBRARY_OUTPUT_PATH: Same as selected for wrapITK
  11. Click 'c' to configure, 'c' to configure and 'g' to generate and exit
  12. Issue command 'make'
  13. Issue command 'make install'


Final setup

Now you can go to root of BioImageXD source and launch BioImageXD by 'python BioImageXD.py'. Depending where you installed libraries, you might need to set PYTHONPATH and/or LD_LIBRARY_PATH. You might even want to set path to your shared libraries to /etc/ld.so.conf.d if your built libs aren't in path already, and you have permission to write to /etc/ld.so.conf.d. If you don't have any additional rights and you have built BioImageXD outside any previously defined paths, you can set PYTHONPATH and LD_LIBRARY_PATH as (notice building of VTK, part 8):
PYTHONPATH=${VTK_INSTALL_PATH}/lib/python2.6/site-packages/VTK-5.6.1-py2.6.egg/:${VTK_INSTALL_PATH}/lib/python2.6/site-packages/:${WRAPITK_SOURCE}/Languages/Python/:${WRAPITK_INSTALL_PATH}/lib/InsightToolkit/WrapITK/Python
LD_LIBRARY_PATH=${VTK_INSTALL_PATH}/lib/vtk-5.6/:${VTK_INSTALL_PATH}/lib/:${ITK_INSTALL_PATH}/lib/InsightToolkit

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox