def prepare_deformation_field_cmd(args, reg_params):
    """
    Prepares the niftyreg command to generate the deformation field from the
    control point file (allready generated in registration).
    :param args:
    :param reg_params:
    :return:
    """
    cmd = '{} -def {} {} -ref {}'.format(reg_params.transform_program_path,
        args.paths.control_point_file_path, args.paths.
        tmp__deformation_field, args.paths.downsampled_background)
    return cmd
