To compile and use ASTex, you need some libraries:
- ITK 4.10
- openexr for saving/loading images in floating point format.
You need some classic development tools (minimal supported version)
- cmake 3.0
- a recent C++ compiler
- g++ 4.9
- clang 3.3
- Visual Studio C++ 2015
Just install packages:
- libinsighttoolkit4-dev (4.10 min)
The most simple way to install dependencies is to use homebrew package system. Then you can install the dependencies:
- brew install insighttoolkit
- brew install openexr
- brew install libpng
Software to install:
- VisualStudio C++ (2015 min)
- CMake (3.0 min),
- jom (already installed if you have QtCreator) for multi-threaded compilation of dependencies
Source to downloads:
- get sources of zlib
- get sources of OpenEXR (use github, archive on OpenEXR.com has bugs)
- get sources of InsightToolKit
- use furnished compilation scripts:
- make a local copy of folder script_windows to avoid pushing your modifications on git server
- edit your installvars.bat (check path for exec, src and installation)
- WARNING due to a limitation in Visual-Studio, source and build (of itk) directory path should not be too long (50 char) !
- double click on install_static_debug.bat for compil/install of zlib/openexr/itk and creation of ASTex solution in static debug mode
- or/and double click on install_static_release.bat for compil/install of zlib/openexr/itk and creation of ASTex solution in static release mode
- or/and double click on install_dynamic_debug.bat for compil/install of zlib/openexr/itk and creation of ASTex solution in dynamic debug mode
- or/adn double click on install_dynamic_release.bat for compil/install of zlib/openexr/itk and creation of ASTex solution in dynamic release mode
- you can reset the ASTex solutions with the reset_static_astex_solu.bat and reset_dynamic_astex_solu.bat scripts
- after you can customize your build with cmake-gui (using the right build directory)
- solutions are in folder build-astex-release / build-astex-debug
- all installed libs (including ASTex) are in the same folder:
- to install ASTex just just generate the INSTALL target
- installed-Release for release
- installed-Debug for debug
Some tests, tutorials and algorithms use read example images and write some results. In order to keep original Data directory of ASTex clean we use a copy which pass can be choosen at cmake configuration stage.
You have to copy yourself the contain of the Data directory in to the right place (see ASTEX_TEMPO_PATH clake variable).
on Linux & Mac
Use CMake as usual:
- create a build directory as same level than ASTex (ASTex-build or ASTex-buildDebug for example)
- go inside build directory and do cmake ../ASTex (or use gui)
- or let (a recent) Qtcreator do the job !
on Windows + VisualStudio
- build directory has been createde by install script
- use the script reset_astex_solu in your copy of script_windows in case of trouble
- use CMake-gui to customize the build
- then launch Visual and load ASTex solution which has been generated in the build directory
There are some original options/values that can be set at the cmake stage:
- ASTEX_ALGO_xxx choose to build the different implemented algorithms.
- ASTEX_BUILD_xxx choose to build bench/tuto/test
- ASTEX_PERSO_xxx for each directory added in ASTex that contain a CMakeLists.txt set this to ON to build. When you add a directory just relaunch cmake.
- ASTEX_TEMPO_PATH path of directory use to store images for test and tuto (copy ASTex/Data into it)
- ASTEX_USE_CPP14 set this to ON if VXL say that you are using a C++ standard version older than the one used ton compile the lib.