function b = getseg(a,l)
%
% getseg: extract coordinates of pixels in segment l
% On input:
%     a: image array
%     l: label number of segment
% On output:
%     b: array of i,j coords of segment members
% Call:
%     b = getseg(a,l)
%

b = [];
[m,n] = size(a);
[a1,ioff,joff] = lext(a,l);
[m1,n1] = size(a1);
for i1 = 1:m1
  for j1 = 1:n1
    if a1(i1,j1)>0
      b = [b; i1+ioff j1+joff];
    end
  end
end
