B-splines in non-rigid image registration : computational framework