Milena (Olena)  User documentation 2.0a Id
Foreword




Generality

The following tutorial explains the basic concepts behind Olena and how to use the most common objects and routines. This tutorial includes many code examples and figures. In order to make this tutorial easier to understand, we will mainly talk about 2D images. This is not so restrictive since 1D, 3D, nD images behave the same way.

Since examples are based on 2D images pixels are actually "points" however we will call them "sites" which is the most generic name.

Here is also a list of common variable name conventions:


ObjectVariable name
Sitep
Valuev
Neighboorn
A site close to another site pq

Olena is organized in a namespace hierarchy. Everything is declared by Olena within the ’mln::’ namespace, and possibly a sub-namespace such as ’mln::arith::’ (arithmetic operations on images), ’mln::morpho::’ (morphological operations), etc. Usually, the namespace hierarchy is mapped to the mln directory tree. For the sake of simplicity, we will neglect the ’mln::’ prefix in all the code examples.

Methods provided by objects in the library are in constant time. If you need a specific method but you cannot find it, you may find an algorithm which can compute the information you need.




Directory hierarchy

Olena’s tarball is structured as follow:

  • milena
    • doc
      • benchmark: set of benchmark.
      • examples: more examples.
      • oldies: partialy not updated documentation. Not recommended for new users.
      • technical: technical doc.
      • tutorial: code sample and tutorial.
    • img: a set of sample images.
    • mesh: a full example which uses Olena.
    • mln: the library. Contains only headers.
    • tests: test suite.
  • swilena: Python bindings for Olena.




Writing and compiling a program with Olena

Before writing your first program, please be aware of these hints:

  • By default, Olena enables a lot of internal pre and post conditions. Usually, this is a useful feature and it should be enabled. However, it can heavily slow down a program though so these tests can be disabled by compiling using -DNDEBUG.
    $ g++ -DNDEBUG -Ipath/to/mln my_program.cc
      
  • If you decide to use optimization flags to compile for debugging, prefer using -O1. It is much faster to compile and it gives good performance results.

 All Classes Namespaces Functions Variables Typedefs Enumerator