Programming with Pandore


Programming Language

The Pandore programming environment is based on the object-oriented programming language C++ and thus takes benefit from its modelling capability, its portability, its large audience and the efficiency of its code.

The image processing concepts are represented as a C++ classes with attributes and member functions. All of these classes are stored within a specific namespace called pandore. Therefore, any Pandore files must includes the Pandore header file and uses the related namespace:

#include <pandore.h>
using namespace pandore;

Data Types

The Pandore programming environment uses all C++ concepts and first of all the primitive base types such as char, short, long, float, double, unsigned char, unsigned short or unsigned long.
However, Pandore redefines those primitive base types in order to increase the portability. Each base type is redefined so as to always keep the same size whatever the machine word size is. They are renamed by reusing the name of the C type except that the first letter is uppercase and a U is added to unsigned type. For example, long int is redefined as Long and is exactly 32 bits and Ulong redefines the unsigned long int.

One supplementary type Errc is defined to encompass all the previous primitive base types. It means that a variable of this type can be set with any of the base type value. Such type is generally used as the return value of the operator function.

=> See Primitive Base Types.

Object Types

All the image processing concepts are defined in the Pandore environment either as a basic object or as a compound object. They are all represented by C++ classes.

The basic objects are:

The compound objects are:

=> See The Pandore objects.

Image Processing Operators

An image processing operator is defined as a traditional C++ function with formal parameters and not as a member function of the related object, in order to avoid to redefine the Pandore class each time a new operator is added.

A Pandore operator looks like the following template example:

Errc operator( const Img2duc &ims, Img2duc &imd, Long par1, Float par2 ) {
   return SUCCESS;

The encoding takes advantage of some programming paradigms implemented as idioms. Basically:

Moreover, there exist some facilities to write generic operators by the way of a preprocessor (See Preprocessing of operators).

Image Processing Applications

An image processing application is a chain of operators. The C++ file is built by including all necessary operators using #include and by developing one or several functions which link operators in order to yield new Pandore objects by successive transformations of the input Pandore objects. In such a chain, output objects of the former operators are input objects of the latter.

=> See Application Programming

The Pantheon project
Image Team GREYC Laboratory
UMR CNRS 6072 - ENSICAEN - University of Caen, France
This page was last modified on 19 June 2015