TiPi framework for solving inverse problems

TiPi is a Java Toolkit for Inverse Problems and Imaging developed as part the MiTiV project and supported by the Magnum2 project. The objective of TiPi is to provide a framework for developping fast algorithms for solving inverse problems in particular in the domain of imaging. TiPi has a number of applications, for instance:

Contents

TiPi provides:

Rationale and performances issues

In TiPi, data and variable are stored in objects called vectors which intentionally have a limited set of methods. These methods are just those which are needed by optimization algorithms and merely correspond to the properties of vectors in the conventional linear algebra sense. Hence the name of these objects in TiPi.

Thanks to these restrictions, vectors can be implemented in forms suitable for performances (non-conventional or distributed memory, etc.) and a particular implementation is simplified by the fact that only few methods have to be exposed (see Creating new vector types).

However, vectors are not really adapted for the many manipulations required to prepare the inputs of the algorithms (e.g., reading images, converting types, perform zero-padding, recentering, etc.) and to save the result (e.g., extracting parts, rescaling, writing to a file, etc.). This is why TiPi provides another type of objects: the shaped arrays. These objects are much more versatile and use conventional memory. We were careful so that their manipulation should be very flexible but, as far as possible, not to the sacrifice of performances.

Typically, an algorithm written in the TiPi framework starts with shaped arrays, does some pre-processing, then creates vectors from the input arrays, runs the iterative method, copies the result into a shaped array, displays and/or saves the shaped array, perhaps after some post-processing.

A caveat for developpers

Many classes in TiPi only differ by the type or rank of the shaped objects which they implement. To avoid tedious edition and management of many similar source files, TiPi has its own pre-processor named tpp (the TiPi Pre-processor). The Java code is generated from source files which have (by convention) the extension .javax and which are stored in the directory tpp. If you want to modify an autogenerated class, first edit the corresponding .javax source and then run the command:

cd tpp                         # move to tpp directory
./tpp <Makefile.x >Makefile    # generate Makefile if Makefile.x has changed
make all                       # make all targets

in the directory tpp.