n-Dimensional Fast Methods  0.7
 All Classes Functions Variables Typedefs Pages
Building

We tried to keep the CMake configuration as simple as possible while keeping the features of a regular library.

Dependencies

This code uses C++11 so a compiler g++ 4.8 or equivalent is required. With GCC 4.7 some runtime problems can occur.

Additional dependencies: Boost, imagemafick and CImg.

$ sudo apt-get install imagemagick libboost-all-dev cimg-dev

Basic instructions

For the impatient:

$ mkdir build
$ cd build
$ make -j4

This will compile the library, the benchmark tool, and the examples. The rest of the instructions assume the terminal is on the build folder.

Options:

  • Select build type:

    $ cmake .. -DCMAKE_BUILD_TYPE=Release (Release, RelWithDebInf or Debug, Release by default)

  • Do not compile examples:

    $ cmake .. -DBUILD_EXAMPLES=false

Documentation

To build latest the documentation:

$ cd doc
$ doxygen

Go into the HTML folder and open index.html in your browser.

Installing

You can install the library in your system by doing:

$ sudo make install

And uninstall it:

    $ sudo make uninstall

Default installation folder is/usr/local for Linux distributions (or equivalent on other OS). Libraries are installed in subfolder lib, together with CMake modules. All the includes are installed under include subfolder. Additionally, in the share subfolder the helper scripts and some samples of benchmark configurations files are installed. Finally, the benchmark binary is installed in bin.

In order to change the default installation folder you can do:

    $ cmake ../.. -DCMAKE_INSTALL_PREFIX=<your folder>

In this case, you will have to adapt your environment variables so that the libraries and CMake modules are found.

The examples folder contains a CMakeLists.txt.template which can be used as a reference for using the library in your own project once it is installed in your system.

Examples

The examples folder contains four examples that are compiled by default. Once they are compiled, you can run them:

  • Demo of different Fast Methods:
$ ./examples/test_fm
  • Demo of the Fast Marching Squared methods:
$ ./examples/test_fm2 -map ../data/map2.png
  • Demo of running a benchmark generated from code:
$ ./test_fm_benchmark
  • Demo of most of the library features:
$ ./examples/full_example -map1 ../data/testimg.png -map2 ../data/map.png -vel ../data/velocities.png

Running a benchmark

See the detailed benchmark documentation.