function p = getpar(a,ice,ich,icr,l)
%
%  getpar: extracts the quadratic fit error, height and radius in the same
%          order as the getseg indexes
% On input:
%     a: 	2D array of labeled segments
%     ice:       quadratic fit error
%     ich:       quadratic fit height value
%     icr:       quadratic fit radius value
%     l:         label of segment to extract
% On output:
%     p:	2D array of dimensions num_seg_elmts by 3
%               col 1: error values
%               col 2: height values
%               col 3: radius values
% Call:
%     p = getpar(a,ice,ich,icr,l)
%  Authors:		Tom Henderson
%			Univ of Utah
%			8 Sept 1996
%

s = getseg(a,l);
[smax,two] = size(s);
p = zeros(smax,3);
for s1 = 1:smax
  p(s1,1) = ice(s(s1,1),s(s1,2));
  p(s1,2) = ich(s(s1,1),s(s1,2));
  p(s1,3) = icr(s(s1,1),s(s1,2));
end
