function score = measure_pdf(input_pdf, pdf_evaluation_method, warped_image)
% 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
% ==============================================================

accumulator = 0;

   % initialise it to zero
   
if (strcmp(pdf_evaluation_method,'TFC Suggestion')),
    for i = 1:size(input_pdf,1),
       current_value = input_pdf(i,:);
       accumulator = accumulator - log(warped_image(i)); 
            % still need to use the above current_value in some way
    end
elseif(strcmp(pdf_evaluation_method,'Default')),
    for i = 1:size(input_pdf,1),
       current_value = input_pdf(i,:);
       accumulator = accumulator + log(mean(current_value));
    end
else
    error('Unknown PDF evaluation method.');
end

score = - accumulator;