Image State Algorithms

In order to allow fast access to the low level image state implementation, the data algorithms are complemented by a similar concept, namely image state algorithms.

Analogous to the image state implementation, each of the different image state algorithms is composed of a double template combination, specifying the data type (real or complex) and the domain (spatial, frequency or half-frequency). And analogous to the data algorithm, there are different algorithms dependent on the purpose of the algorithm to be implemented: non-modifying, in-place modifying and out-of-place modifying.

In should be pointed out the the image state algorithms are really a hybrid concept, as they may be used as normal data algorithms as well !

Overview

The following list outlines the creation of an image state algorithm:

  1. deciding on the algorithm type
  2. setting up a special class that implements the desired functionality
  3. creating the actual algorithm type by using this class as a template parameter to one of the image state algorithm classes
  4. choosing the appropriate implementation and coding the algorithm

Setting up the special class

A class with a specific structure is required that is later used as a template parameter. The exact syntax is dependent on the type of algorithm. The minimal interface comprises two methods: a templated VisitState(), and a (possibly static) GetAlgorithmName(). Additional methods may be added, in particular a destructor and/or special constructors.

Creating algorithm type

Once the special class is prepared, it is used as a template parameter to a type definition

Putting it all together

there is lots of stuff missing here... to be filled in asap

non-modifying algorithm

class MyAlgorithmFnc {
public:
  MyAlgorithmFunc();
  // other ctors

  // entry point for image state visitor
  template<typename T, class D>
  void VisitState(const iplt::image_state::ImageStateImpl<T,D>& isi);

  // entry point for function visitor
  void VisitFunction(const Funcion& f);

  // name of algorithm
  static string GetAlgorithmName();

  // other methods may follow here
};

// injecting the special function class
typedef image_state::ImageStateModIPAlgorithm<MyAlgorithmFunc> MyAlgorithm;

} } } // namespaces