Build in Mac OSX
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | |||
These instructions give details how we build all necessary libraries and setup BioImageXD in Mac OSX. 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 Mac OSX. 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. | ||
Line 7: | Line 8: | ||
* SWIG 1.3.38 or newer (2.x.x series haven't been tested), http://www.swig.org/ | * SWIG 1.3.38 or newer (2.x.x series haven't been tested), http://www.swig.org/ | ||
* Subversion client | * Subversion client | ||
+ | |||
+ | '''Important note:''' | ||
+ | * The source, build and install directories should be kept separate. Mixing source, build and install files in one or two directories can result in build and/or install errors. | ||
+ | * If you need to rebuild a library, clean out (remove) the build directory files and start again. | ||
Line 14: | Line 19: | ||
# Extract package | # Extract package | ||
# Create new build directory for building VTK | # Create new build directory for building VTK | ||
− | # Go to build directory and issue command 'ccmake ${ | + | # Go to build directory and issue command 'ccmake ${VTK_SOURCE}' |
# 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): | ||
#: <code>BUILD_SHARED_LIBS: ON</code> | #: <code>BUILD_SHARED_LIBS: ON</code> | ||
Line 24: | Line 29: | ||
# Click 'c' to configure and set | # Click 'c' to configure and set | ||
#: <code>VTK_USE_TK: OFF</code> | #: <code>VTK_USE_TK: OFF</code> | ||
+ | # If you're running a version of OS X that doesn't include Python 2.7 by default (and you have to install it separately) set the following parameters: | ||
+ | #: <code>PYTHON_EXECUTABLE: /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7</code> | ||
+ | #: <code>PYTHON_INCLUDE_DIR: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/</code> | ||
+ | #: <code>PYTHON_LIBRARY: /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib</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 <code>${VTK_INSTALL_DIR}/lib/python2.7/site-packages/</code> to <code>PYTHONPATH</code> so you can install VTK correctly, if you are installing VTK outside path | # Set <code>${VTK_INSTALL_DIR}/lib/python2.7/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 <code>CMAKE_INSTALL_PREFIX</code> | # Issue command 'make install' to install built VTK to directory defined in <code>CMAKE_INSTALL_PREFIX</code> | ||
+ | # If you experience a <code>PYTHONPATH</code> issue when installing VTK, you can try using the command <code>sudo python setup.py install</code> in your build directory's <code>Wrapping/Python</code> sub-directory. | ||
Line 35: | Line 45: | ||
# Extract package | # Extract package | ||
# Create new build directory for building ITK | # Create new build directory for building ITK | ||
− | # Go to build directory and issue command 'ccmake ${ | + | # Go to build directory and issue command 'ccmake ${ITK_SOURCE}' |
# 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): | ||
#: <code>BUILD_EXAMPLES: OFF</code> | #: <code>BUILD_EXAMPLES: OFF</code> | ||
Line 50: | Line 60: | ||
− | == Building CableSwig (needed for | + | == 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 | # Download CableSwig-ITK 3.20.0, http://voxel.dl.sourceforge.net/sourceforge/itk/CableSwig-ITK-3.20.0.tar.gz | ||
Line 64: | Line 74: | ||
− | == Building | + | == Building WrapITK (the long-lasting part) == |
− | # Create directory for | + | # Create directory for WrapITK source |
# Go to directory and fetch sources using command 'svn checkout http://wrapitk.googlecode.com/svn/branches/maint .' | # Go to directory and fetch sources using command 'svn checkout http://wrapitk.googlecode.com/svn/branches/maint .' | ||
− | # Create new build directory for building | + | # Append <code>.notwrapped</code> to the following files: |
+ | #: <code>Libraries/LevelSet/wrap_itkNarrowBandCurvesLevelSetImageFilter.cmake</code> --> <code>Libraries/LevelSet/wrap_itkNarrowBandCurvesLevelSetImageFilter.cmake.notwrapped</code> | ||
+ | #: <code>Libraries/Registration/wrap_itkHoughTransform2DCirclesImageFilter.cmake</code> --> <code>Libraries/Registration/wrap_itkHoughTransform2DCirclesImageFilter.cmake.notwrapped</code> | ||
+ | #: <code>Libraries/IO/wrap_ITKIOBase.cmake</code> --> <code>Libraries/IO/wrap_ITKIOBase.cmake.notwrapped</code> | ||
+ | # Create new build directory for building WrapITK | ||
# Go to build directory and issue command 'ccmake ${WRAPITK_SOURCE}' | # Go to build directory and issue command 'ccmake ${WRAPITK_SOURCE}' | ||
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error): | # Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing ITK_DIR error): | ||
Line 74: | Line 88: | ||
#: <code>CMAKE_BUILD_TYPE: Release</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>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 | + | #: <code>ITK_DIR: Set to your ITK build directory</code> |
#: <code>WRAP_double: ON</code> | #: <code>WRAP_double: ON</code> | ||
#: <code>WRAP_unsigned_char: ON</code> | #: <code>WRAP_unsigned_char: ON</code> | ||
#: <code>WRAP_unsigned_long: ON</code> | #: <code>WRAP_unsigned_long: ON</code> | ||
# Click 'c' to configure (don't care about possible errors) and set | # Click 'c' to configure (don't care about possible errors) and set | ||
− | #: <code>CableSwig_DIR: Set to | + | #: <code>CableSwig_DIR: Set to your CableSwig build directory</code> |
#: <code>WRAP_ITK_PYTHON: ON</code> | #: <code>WRAP_ITK_PYTHON: ON</code> | ||
#: <code>INSTALL_WRAP_ITK_COMPATIBILITY: OFF</code> | #: <code>INSTALL_WRAP_ITK_COMPATIBILITY: OFF</code> | ||
+ | # If you needed to install SWIG to comply with the prerequisites, set the following parameters to correspond to your installed version (here 1.3.38): | ||
+ | #: <code>SWIG_DIR: /usr/local/share/swig/1.3.38</code> | ||
+ | #: <code>SWIG_EXECUTABLE: /usr/local/bin/swig</code> | ||
+ | #: <code>SWIG_VERSION: 1.3.38</code> | ||
+ | # If you're running a version of OS X that doesn't include Python 2.7 by default (and you have to install it separately) set the following parameters: | ||
+ | #: <code>PYTHON_EXECUTABLE: /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7</code> | ||
+ | #: <code>PYTHON_INCLUDE_DIR: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/</code> | ||
+ | #: <code>PY_SITE_PACKAGES_PATH: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages</code> | ||
# Click 'c' to configure, nothing to set so click 'c' to configure again, and 'g' to generate and exit | # 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 | + | # 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 | + | # Issue command 'make install' to install built WrapITK to directory defined in <code>CMAKE_INSTALL_PREFIX</code> |
− | # Go into directory ${ | + | # Go into directory ${WrapITK_source}/ExternalProjects/ItkVtkGlue |
− | # | + | # Create build directory for ItkVtkGlue |
+ | # Go to build directory and issue command 'ccmake ${ITKVTKGLUE_SOURCE}' | ||
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about missing <code>ITK_DIR</code> error): | # 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>BUILD_WRAPPERS: ON</code> | ||
#: <code>CMAKE_BUILD_TYPE: Release</code> | #: <code>CMAKE_BUILD_TYPE: Release</code> | ||
− | #: <code>CMAKE_INSTALL_PREFIX: Same as selected for | + | #: <code>CMAKE_INSTALL_PREFIX: Same as selected for WrapITK</code> |
− | #: <code>ITK_DIR: Set to | + | #: <code>ITK_DIR: Set to your ITK build directory</code> |
− | #: <code>LIBRARY_OUTPUT_PATH: Same as selected for | + | #: <code>LIBRARY_OUTPUT_PATH: Same as selected for WrapITK</code> |
# Click 'c' to configure (don't care about possible errors) and set | # Click 'c' to configure (don't care about possible errors) and set | ||
− | #: <code>VTK_DIR: Set to | + | #: <code>VTK_DIR: Set to your VTK build directory</code> |
+ | #: <code>CableSwig_DIR: Set to your CableSwig build directory</code> | ||
+ | # Set the SWIG and PYTHON parameters as you set them for WrapITK. (In other words <code>SWIG_DIR</code>, <code>SWIG_EXECUTABLE</code>, <code>SWIG_VERSION</code>, <code>PYTHON_EXECUTABLE</code>, <code>PYTHON_INCLUDE_DIR</code>, <code>PY_SITE_PACKAGES_PATH</code>.) | ||
# Click 'c' to configure and set | # Click 'c' to configure and set | ||
− | #: <code>WrapITK_DIR: Set to | + | #: <code>WrapITK_DIR: Set to WrapITK build directory</code> |
# Click 'c' to configure, and 'g' to generate and exit | # Click 'c' to configure, and 'g' to generate and exit | ||
# Issue command 'make' | # Issue command 'make' | ||
Line 105: | Line 130: | ||
# Create directory for BioImageXD sources and fetch sources using command 'svn co https://bioimagexd.svn.sourceforge.net/svnroot/bioimagexd/bioimagexd/trunk .' | # Create directory for BioImageXD sources and fetch sources using command 'svn co https://bioimagexd.svn.sourceforge.net/svnroot/bioimagexd/bioimagexd/trunk .' | ||
− | # Go into directory ${ | + | # Go into directory ${BXD_SOURCE}/vtkBXD |
− | # | + | # Create new build directory for vtkBXD |
+ | # Go into build directory and issue command 'ccmake ${VTKBXD_SOURCE}' | ||
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors): | # Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors): | ||
#: <code>CMAKE_BUILD_TYPE: Release</code> | #: <code>CMAKE_BUILD_TYPE: Release</code> | ||
#: <code>CMAKE_INSTALL_PREFIX: Same as selected for VTK</code> | #: <code>CMAKE_INSTALL_PREFIX: Same as selected for VTK</code> | ||
− | #: <code>VTK_DIR: Set to | + | #: <code>VTK_DIR: Set to your VTK build directory</code> |
# Click 'c' to configure, 'c' to configure, and 'g' to generate and exit | # Click 'c' to configure, 'c' to configure, and 'g' to generate and exit | ||
+ | # If you receive a vtkImageMaskAutoThresholdColocalization.cxx related error, remove it from the list in the Processing/CMakeLists.txt file in the vtkBXD source directory. | ||
# Issue command 'make' | # Issue command 'make' | ||
# Issue command 'make install' | # Issue command 'make install' | ||
− | # Go into directory ${ | + | # We're aware that the install files are placed in a python2.6 directory. This will be fixed in a future update. It will not cause any issues other than having to setup your PYTHONPATH |
− | # | + | # Go into directory ${BXD_SOURCE}/itkBXD |
+ | # Create new build directory for itkBXD | ||
+ | # Go into build directory and issue command 'ccmake ${ITKBXD_SOURCE}' | ||
# Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors): | # Set following settings (click 't' to toggle advanced mode on, and 'c' to configure, don't care about possible errors): | ||
#: <code>CMAKE_BUILD_TYPE: Release</code> | #: <code>CMAKE_BUILD_TYPE: Release</code> | ||
− | #: <code>CMAKE_INSTALL_PREFIX: Same as selected for | + | #: <code>CMAKE_INSTALL_PREFIX: Same as selected for WrapITK</code> |
− | #: <code>ITK_DIR: Set to | + | #: <code>ITK_DIR: Set to your ITK build directory</code> |
− | #: <code>WrapITK_DIR: Set to | + | #: <code>WrapITK_DIR: Set to your WrapITK build directory</code> |
− | #: <code>LIBRARY_OUTPUT_PATH: Same as selected for | + | #: <code>LIBRARY_OUTPUT_PATH: Same as selected for WrapITK</code> |
+ | # Set the SWIG and PYTHON parameters as you set them for WrapITK. (In other words <code>SWIG_DIR</code>, <code>SWIG_EXECUTABLE</code>, <code>SWIG_VERSION</code>, <code>PYTHON_EXECUTABLE</code>, <code>PYTHON_INCLUDE_DIR</code>, <code>PY_SITE_PACKAGES_PATH</code>.) | ||
# Click 'c' to configure, 'c' to configure and 'g' to generate and exit | # Click 'c' to configure, 'c' to configure and 'g' to generate and exit | ||
# Issue command 'make' | # Issue command 'make' | ||
Line 130: | Line 160: | ||
− | + | Using the Terminal application, issue the following command 'pico ~/.bash_profile'. If everything has gone according to plan, you should only need to set up the two following environment variables: | |
− | + | : <code>export DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/vtk-5.6/:$DYLD_LIBRARY_PATH</code> | |
− | + | : <code>export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python2.6/site-packages/:$PYTHONPATH</code> | |
− | + | ||
+ | NOTE: ${CMAKE_INSTALL_PREFIX} should be replaced with your install directory. For example, if your install directory was /usr/local, it should read: /usr/local/lib/vtk-5.6/ etc. Unless you have other libraries installed at these locations you should be good to go. Simply go to the directory where you downloaded the BXD source and issue python BioImageXD.py. |
Latest revision as of 08:10, 10 July 2012
These instructions give details how we build all necessary libraries and setup BioImageXD in Mac OSX. 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.
Prerequisites:
- Python 2.7, http://www.python.org
- wxPython 2.9.3 or newer, http://www.wxpython.org/
- CMake 2.6 or newer, http://www.cmake.org
- SWIG 1.3.38 or newer (2.x.x series haven't been tested), http://www.swig.org/
- Subversion client
Important note:
- The source, build and install directories should be kept separate. Mixing source, build and install files in one or two directories can result in build and/or install errors.
- If you need to rebuild a library, clean out (remove) the build directory files and start again.
Contents |
[edit] 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
- Extract package
- Create new build directory for building VTK
- Go to build directory and issue command 'ccmake ${VTK_SOURCE}'
- 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
-
- Click 'c' to configure and set
-
VTK_USE_TK: OFF
-
- If you're running a version of OS X that doesn't include Python 2.7 by default (and you have to install it separately) set the following parameters:
-
PYTHON_EXECUTABLE: /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
-
PYTHON_INCLUDE_DIR: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/
-
PYTHON_LIBRARY: /Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
-
- 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
- Set
${VTK_INSTALL_DIR}/lib/python2.7/site-packages/
toPYTHONPATH
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
- If you experience a
PYTHONPATH
issue when installing VTK, you can try using the commandsudo python setup.py install
in your build directory'sWrapping/Python
sub-directory.
[edit] 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
- Create new build directory for building ITK
- Go to build directory and issue command 'ccmake ${ITK_SOURCE}'
- 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
-
- 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
CMAKE_INSTALL_PREFIX
[edit] 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
- Create new build directory for building CableSwig
- Go to build directory and issue command 'ccmake ${CABLESWIG_SOURCE}'
- 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
-
- 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
CMAKE_INSTALL_PREFIX
[edit] 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 .'
- Append
.notwrapped
to the following files:-
Libraries/LevelSet/wrap_itkNarrowBandCurvesLevelSetImageFilter.cmake
-->Libraries/LevelSet/wrap_itkNarrowBandCurvesLevelSetImageFilter.cmake.notwrapped
-
Libraries/Registration/wrap_itkHoughTransform2DCirclesImageFilter.cmake
-->Libraries/Registration/wrap_itkHoughTransform2DCirclesImageFilter.cmake.notwrapped
-
Libraries/IO/wrap_ITKIOBase.cmake
-->Libraries/IO/wrap_ITKIOBase.cmake.notwrapped
-
- Create new build directory for building WrapITK
- Go to build directory and issue command 'ccmake ${WRAPITK_SOURCE}'
- 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
-
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 your ITK build directory
-
WRAP_double: ON
-
WRAP_unsigned_char: ON
-
WRAP_unsigned_long: ON
-
- Click 'c' to configure (don't care about possible errors) and set
-
CableSwig_DIR: Set to your CableSwig build directory
-
WRAP_ITK_PYTHON: ON
-
INSTALL_WRAP_ITK_COMPATIBILITY: OFF
-
- If you needed to install SWIG to comply with the prerequisites, set the following parameters to correspond to your installed version (here 1.3.38):
-
SWIG_DIR: /usr/local/share/swig/1.3.38
-
SWIG_EXECUTABLE: /usr/local/bin/swig
-
SWIG_VERSION: 1.3.38
-
- If you're running a version of OS X that doesn't include Python 2.7 by default (and you have to install it separately) set the following parameters:
-
PYTHON_EXECUTABLE: /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
-
PYTHON_INCLUDE_DIR: /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/
-
PY_SITE_PACKAGES_PATH: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
-
- 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
CMAKE_INSTALL_PREFIX
- Go into directory ${WrapITK_source}/ExternalProjects/ItkVtkGlue
- Create build directory for ItkVtkGlue
- Go to build directory and issue command 'ccmake ${ITKVTKGLUE_SOURCE}'
- 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 your ITK build directory
-
LIBRARY_OUTPUT_PATH: Same as selected for WrapITK
-
- Click 'c' to configure (don't care about possible errors) and set
-
VTK_DIR: Set to your VTK build directory
-
CableSwig_DIR: Set to your CableSwig build directory
-
- Set the SWIG and PYTHON parameters as you set them for WrapITK. (In other words
SWIG_DIR
,SWIG_EXECUTABLE
,SWIG_VERSION
,PYTHON_EXECUTABLE
,PYTHON_INCLUDE_DIR
,PY_SITE_PACKAGES_PATH
.) - Click 'c' to configure and set
-
WrapITK_DIR: Set to WrapITK build directory
-
- Click 'c' to configure, and 'g' to generate and exit
- Issue command 'make'
- Issue command 'make install'
[edit] Get BioImageXD sources and build vtkBXD and itkBXD
- Create directory for BioImageXD sources and fetch sources using command 'svn co https://bioimagexd.svn.sourceforge.net/svnroot/bioimagexd/bioimagexd/trunk .'
- Go into directory ${BXD_SOURCE}/vtkBXD
- Create new build directory for vtkBXD
- Go into build directory and issue command 'ccmake ${VTKBXD_SOURCE}'
- 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 your VTK build directory
-
- Click 'c' to configure, 'c' to configure, and 'g' to generate and exit
- If you receive a vtkImageMaskAutoThresholdColocalization.cxx related error, remove it from the list in the Processing/CMakeLists.txt file in the vtkBXD source directory.
- Issue command 'make'
- Issue command 'make install'
- We're aware that the install files are placed in a python2.6 directory. This will be fixed in a future update. It will not cause any issues other than having to setup your PYTHONPATH
- Go into directory ${BXD_SOURCE}/itkBXD
- Create new build directory for itkBXD
- Go into build directory and issue command 'ccmake ${ITKBXD_SOURCE}'
- 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 your ITK build directory
-
WrapITK_DIR: Set to your WrapITK build directory
-
LIBRARY_OUTPUT_PATH: Same as selected for WrapITK
-
- Set the SWIG and PYTHON parameters as you set them for WrapITK. (In other words
SWIG_DIR
,SWIG_EXECUTABLE
,SWIG_VERSION
,PYTHON_EXECUTABLE
,PYTHON_INCLUDE_DIR
,PY_SITE_PACKAGES_PATH
.) - Click 'c' to configure, 'c' to configure and 'g' to generate and exit
- Issue command 'make'
- Issue command 'make install'
[edit] Final setup
Using the Terminal application, issue the following command 'pico ~/.bash_profile'. If everything has gone according to plan, you should only need to set up the two following environment variables:
-
export DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/vtk-5.6/:$DYLD_LIBRARY_PATH
-
export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python2.6/site-packages/:$PYTHONPATH
NOTE: ${CMAKE_INSTALL_PREFIX} should be replaced with your install directory. For example, if your install directory was /usr/local, it should read: /usr/local/lib/vtk-5.6/ etc. Unless you have other libraries installed at these locations you should be good to go. Simply go to the directory where you downloaded the BXD source and issue python BioImageXD.py.