MEASURE_PDF: Measure the "goodness" of a group-wise PDF GENERAL score = measure_pdf(input_pdf, pdf_evaluation_method) INPUT/S -input pdf: -pdf_evaluation_method: OUTPUT/S -score: PENDING WORK - KNOWN BUG/S -None. COMMENT/S RELATED FUNCTION/S ABOUT -Created: February 2004 -Last update: February 2004 -Revision: 0.0.1 -Author: R. S. Schestowitz, University of Manchester ==============================================================
0001 function score = measure_pdf(input_pdf, pdf_evaluation_method, warped_image) 0002 % MEASURE_PDF: Measure the "goodness" of a group-wise PDF 0003 % 0004 % GENERAL 0005 % 0006 % score = measure_pdf(input_pdf, pdf_evaluation_method) 0007 % 0008 % INPUT/S 0009 % 0010 % -input pdf: 0011 % 0012 % -pdf_evaluation_method: 0013 % 0014 % OUTPUT/S 0015 % 0016 % -score: 0017 % 0018 % PENDING WORK 0019 % 0020 % - 0021 % 0022 % KNOWN BUG/S 0023 % 0024 % -None. 0025 % 0026 % COMMENT/S 0027 % 0028 % 0029 % RELATED FUNCTION/S 0030 % 0031 % 0032 % 0033 % ABOUT 0034 % 0035 % -Created: February 2004 0036 % -Last update: February 2004 0037 % -Revision: 0.0.1 0038 % -Author: R. S. Schestowitz, University of Manchester 0039 % ============================================================== 0040 0041 accumulator = 0; 0042 0043 % initialise it to zero 0044 0045 if (strcmp(pdf_evaluation_method,'TFC Suggestion')), 0046 for i = 1:size(input_pdf,1), 0047 current_value = input_pdf(i,:); 0048 accumulator = accumulator - log(warped_image(i)); 0049 % still need to use the above current_value in some way 0050 end 0051 elseif(strcmp(pdf_evaluation_method,'Default')), 0052 for i = 1:size(input_pdf,1), 0053 current_value = input_pdf(i,:); 0054 accumulator = accumulator + log(mean(current_value)); 0055 end 0056 else 0057 error('Unknown PDF evaluation method.'); 0058 end 0059 0060 score = - accumulator;