The overall goal of image registration is to compute a deformation, such that a deformed version of an image becomes similar to a so-called reference image. Hence, the similarity measure is an important building block. Depending on the application at hand, it is inevitable to constrain the wanted deformation in an appropriate way. Thus, regularization is also a main building block. Finally, it is often desirable to incorporate higher level information about the expected deformation. We show how such constraints or information can easily be integrated in our general framework and discuss some examples. Moreover, the proposed general framework allows for a unified algorithmic treatment of the various building blocks.In particular in medical imaging, registration