A general formalism to impose topology preserving regularity on a given irregular deformation field is presented. The topology preservation conditions are derived with regard to the discrete approximations to the deformation field Jacobian in a two-dimensional image registration problem. The problem of enforcing topology preservation onto a given deformation field is formulated in terms of the deformation gradients, and solved using a cyclic projections approach. The generalization of the developed algorithm leads to a deformation field regularity control by limiting the per voxel volumetric change within a prescribed interval. Extension of the topology preservation conditions onto a three-dimensional registration problem is also presented, together with a comparative analysis of the proposed algorithm with respect to a Gaussian regularizer that enforces the same topology preservation conditions.