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