============================================================== EVAL_NMI_MULTI_WARP: Applies a multi warp and evaluates the warped image against the reference image. Code written by Katherine Smith, 2003 GENERAL score = eval_nmi_multi_warp(knot_displacements, init_knots, unwarped_image, unwarped_points, ref_image, ref_points, n_modes, warp_params) INPUT/S -knot_displacements: Some warp specific parameter. -init_knots: Some warp specific parameter. -unwarped_image: Images to be warped. -unwarped_points: Points to be warped (points define the images in a way). -ref_image: The reference image. -ref_points: The reference image points. -n_modes: The number of modes -warp_params: The parameters of the warp OUTPUT/S -score: Mean-squared difference score. PENDING WORK - KNOWN BUG/S -None. COMMENT/S - RELATED FUNCTION/S MSD, EVAL_MSD, EVAL_MSD_CPS_WARP ABOUT -Created: November 23rd, 2003 -Last update: Novermber 26th, 2003 -Revision: 0.0.2 -Author: R. S. Schestowitz, University of Manchester ==============================================================
0001 function score = eval_nmi_multi_warp(knot_displacements, init_knots, unwarped_image, unwarped_points, ref_image, ref_points, n_modes, warp_params, number_of_bins) 0002 % ============================================================== 0003 % EVAL_NMI_MULTI_WARP: Applies a multi warp and evaluates the 0004 % warped image against the reference image. 0005 % 0006 % Code written by Katherine Smith, 2003 0007 % 0008 % GENERAL 0009 % 0010 % score = eval_nmi_multi_warp(knot_displacements, init_knots, 0011 % unwarped_image, unwarped_points, ref_image, ref_points, 0012 % n_modes, warp_params) 0013 % 0014 % INPUT/S 0015 % 0016 % -knot_displacements: 0017 % Some warp specific parameter. 0018 % 0019 % -init_knots: 0020 % Some warp specific parameter. 0021 % 0022 % -unwarped_image: 0023 % Images to be warped. 0024 % 0025 % -unwarped_points: 0026 % Points to be warped (points define the images in a way). 0027 % 0028 % -ref_image: 0029 % The reference image. 0030 % 0031 % -ref_points: 0032 % The reference image points. 0033 % 0034 % -n_modes: 0035 % The number of modes 0036 % 0037 % -warp_params: 0038 % The parameters of the warp 0039 % 0040 % OUTPUT/S 0041 % 0042 % -score: 0043 % Mean-squared difference score. 0044 % 0045 % PENDING WORK 0046 % 0047 % - 0048 % 0049 % KNOWN BUG/S 0050 % 0051 % -None. 0052 % 0053 % COMMENT/S 0054 % 0055 % - 0056 % 0057 % RELATED FUNCTION/S 0058 % 0059 % MSD, EVAL_MSD, EVAL_MSD_CPS_WARP 0060 % 0061 % ABOUT 0062 % 0063 % -Created: November 23rd, 2003 0064 % -Last update: Novermber 26th, 2003 0065 % -Revision: 0.0.2 0066 % -Author: R. S. Schestowitz, University of Manchester 0067 % ============================================================== 0068 0069 % Smith:scale it all down to try and get it to move more 0070 % RSS: (when warping?)... might need some alteration 0071 0072 % init_knots = init_knots*0.01; 0073 % unwarped_points = unwarped_points*0.01; 0074 0075 warped_points = nrr_trans_1d(unwarped_points, init_knots, init_knots + knot_displacements, warp_params, []); 0076 % warp points using <multi warp> 0077 warped_image = interp1(unwarped_points,unwarped_image,warped_points, 'linear',0); 0078 % interpolate image to get cleaner warped image 0079 score = nmi(ref_image, warped_image, number_of_bins); 0080 % evaluate warped image according to reference image