[IPOL discuss] Framework available

Miguel Colom Miguel.Colom at cmla.ens-cachan.fr
Wed Dec 28 16:08:06 CET 2011


Dear all,
I've been putting all the routines I needed in my programs in a unified
C++ framework. This framework allows me to code algorithms faster, because
all common steps are already done by the framework and I can put my effort
in the algorithm being coded, and not all the technical stuff needed to
have a working prototype.

I think this framework can be useful for all the IPOL community, so I've
put the current version online, available for everybody:
http://dev.ipol.im/~colom/framework/framework.zip

This framework is NOT a math library, that is, it doesn't implement
algebraic functions, or any numeric algorithms, but only those functions I
consider that all programs have to implement and therefore it's useless
and time-wasting to implement them over and over each time a new program
is created.

The framework does the following tasks:
- Parsing command line arguments.
- Create arrays and arbitrary dimension matrices.
- Load and save matrices contents from and to files.
- Automatic memory freeing at the end to prevent memory leaks.
- Load/save 8/16 bits PNG, load CNES LUM files and load/save data in a
float-binary format to store intermediate results.
- Adaptive and fixed bin histograms of data.
- Stop the execution of the algorithm at any time and start the framework
integrated debugger. It allows to list those matrices in memory, get and
set the stored values, load/save matrices from and to files, ...
- Print the call stack status in case of a exception (error) during the
algorithm execution. To invoke the debugger, the START_INSPECTOR macro has
to be put in the place of the code the user wants to start it.
- Possibility to get a verbose output of the program operations.
- The algorithm code is isolated in the files "algo.cpp" and "algo.h"

The framework doesn't impose any particular format for the data. When it
creates a matrix, the addressing is up to the user. For instance, when a
2D matrix is created, it has to be addressed with M[Nx*y+x]. It was
designed this way because the framework only takes care of the memory
assignment/freeing of the matrices.

I hope this is useful for everybody.

Best,
Miguel




More information about the discuss mailing list