This paper presents a new nonrigid monomodality image registration algorithm based on B-splines. The deformation is described by a cubic B-spline field and found by minimizing the energy between a reference image and a deformed version of a floating image. To penalize noninvertible transformation, we propose two different constraints on the Jacobian of the transformation and its derivatives. The problem is modeled by an inequality constrained optimization problem which is efficiently solved by a combination of the multipliers method and the L-BFGS algorithm to handle the large number of variables and constraints of the registration of 3-D images. Numerical experiments are presented on magnetic resonance images using synthetic deformations and atlas based segmentation.