Method frames also faciliate operations on heterogeneous image types. In other words, method frames ensure that the image types (signatures) of all images involved in an operation "match". The image types involved in an operation are the object itself, all of its image parameters and the result of the operation. These types must match the signatures used to instantiate the image functor that is going to be called by the member function otherwise the operation cannot be executed. Method frames try to make a match based on information in the so-called rule base (HxImgFtorRuleBase). In case there is no exact match, the method frames will adjust image types by creating temporary variables of the appropriate image type and initializing them with data from the corresponding image. The method frames also allocate a result image of the appropriate type.
A method frame is initialized typically with a pointer to the data, i.e. an instantiation of HxImageData, obtained via HxImageRep::pointee(). The constructor of the method frame takes care of possible allocation of temporary image data and conversion of image data according to the task of the frame. The specific copy and/or conversion schemes are hidden from the method frame class user by the object
, argument
, kernel
, and result
member functions. After construction of the method frame, the user should use only these functions to access the image data of the object as well as possible arguments. The result of the operation is typically an instantiation of HxImageRep intialized with the result
of the method frame. The destructor of the method frame removes temporary images.
The list of method frames