Algorithm Concepts

To allow various image manipulation routines that are decoupled from the actual image implementations (ImageHandle and ImageState), both on the high- as well as low-level of the image, an extensive set of algorithm base classes is provided to facilitate the implementation of novel algorithms.

IPLT is using the concept of algorithm objects: In order to apply an algorithm to an image, an instance of that particular algorithm class must be created, which is then passed to one of the various Apply methods of the ImageHandle interface. This extends the possibilities of algorithms beyond what is possible with simple function calls.

Algorithm Types

Five different types of algorithms can be identified:

NonMod
An algorithm that will not modify the values in the image, but rather gather some data. Example: a histogram. Implemented as NonModAlgorithm and ImageStateNonModAlgorithm
ModIP
An algorithm that will modify the image values directly in place; in addition, it may choose to write to its internal state during application of the algorithm. Implemented as ModIPAlgorithm and ImageStateModIPAlgorithm
ConstModIP
Similar to ModIP, this algorithm will modify the values directly in place. However, it does not need to store information itself beyond the application of the algorithm itself. Example: setting all image values to zero. Implemented as ConstModIPAlgorithm and ImageStateConstModIPAlgorithm
ModOP
An algorithm that will return a new, modified version of the image, while leaving the original untouched. Again, the algorithm can store information to be available after it has been applied. ModOPAlgorithm and ImageStateModOPAlgorithm
ConstModOP
Similar to ModOP, except that no information can be stored beyond the application of the algorithm itself. Example: rotation around an arbitrary angle. Implemented as ConstModOPAlgorithm and ImageStateConstModOPAlgorithm

Custom Algorithms

Writing custom algorithms for iplt is fairly straightforward, in view of the fact that the final algorithm will integrate seamlessly into the build, as well as the C++ and Python runtime environment.

There are two fundamental types of algorithms, those that operate on high level ImageHandle instances, DataAlgorithms, and those that operate on the low level ImageState instances, ImageStateAlgorithms.