function points = apply_perturbation_to_points (points, offset_extent, perturbation_method)
% APPLY_PERTURBATION_TO_POINTS: Apply noise to (correct) warp
%
%
%    GENERAL
%
%      points= apply_perturbation_to_points (points, offset_extent)
%
%    INPUT/S
%
%      -points
%         The points defining the CPS warp
%      
%      -offset entent
%         Defines the amount of noise/distortion
%
%      -perturbation_method
%         The method of applying the change
%           
%    OUTPUT/S
%
%      -points
%         The points after offset application
%
%    PENDING WORK
%
%      -
%
%    KNOWN BUG/S
%
%      -
%
%    COMMENT/S
%
%      -
%
%    RELATED FUNCTION/S
%
%      
%
%    ABOUT
%
%      -Created:     March 10th, 2004
%      -Last update: March 11th, 2004
%      -Revision:    0.0.3
%      -Author:      R. S. Schestowitz, University of Manchester
% ==============================================================


if (strcmp(perturbation_method, 'random noise')),
 for i=1:size(points,2),
  points(i) = points(i) + offset_extent * (rand - 0.5) * 0.1;
  % points = average_smooth(points,5);
 end
elseif (strcmp(perturbation_method, 'CPS warp')),
  % to be implemented
end
