ASTex is an open-source library for texture analysis and synthesis. The term “texture” must be understood as in computer graphics. The purpose of this library is to support collaborative coding and to allow for comparison with recently published algorithms.
To compile and use ASTex, you need some libraries:
- ITK 5. min
- zlib
- openexr for saving/loading images in floating point format.
You need some classic development tools (minimal supported version)
- git
- cmake 3.0 min
- a recent C++ compiler
- g++ 6
- clang 3.3
- Visual Studio C++ 2017 /2019
Just install packages:
- libinsighttoolkit4-dev (4.10 min)
- libpng-dev
- libopenexr-dev
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
- VisualStudio C++ (2017 min)
- Git
- CMake (3.0 min)
- ouvrir un power shell
- git clone https://github.com/Microsoft/vcpkg.git c:/vcpkg_ast (ou utiliser le zip)
- git checkout 2019.12
- cd c:/vcpkg_ast
- .\vcpkg.exe install itk:x64-windows openexr:x64-windows
- patch buggy itk compilation:
- in ITKModuleAPI.cmake line 75
``macro(itk_module_load mod)
- set(_IMPORT_PREFIX ${ITK_INSTALL_PREFIX}) ``
- in ITKTargets.cmake: 283
``INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/ITK-5.0"
- "INTERFACE_LINK_DIRECTORIES "${_IMPORT_PREFIX}/lib" ``
- in ITKModuleAPI.cmake line 75
``macro(itk_module_load mod)
- launch CMake, chose src dir and binary dir
- Configure: VS 2019 / optional plateform : x64/ Specify toolchain file for cross-compiling
- Specify tool chain file:
c:/vcpkg_ast/scripts/buildsystems/vcpkg.cmake
- Configure again
- Generate
- Launch Solution
- Enjoy
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).
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 !
- build directory has been createde by install script
- 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.
All contributions to ASTex are welcome and will be examined.
To contribute:
- you need a github account.
- fork ASTex repository on your account
- create a branch from the develop one
- develop your contribution
- do pull-request on ASTex/develop branch