%dip_areaopening   Area opening and closing
%    out = dip_areaopening(grey,mask,fsize,connectivity,closing)
%
%   grey
%      Image
%   mask
%      Mask image
%   fsize
%      Integer
%   connectivity
%      Integer
%   closing
%      1 for the closing operation, 0 for the opening operation.

% (C) Copyright 1999-2008               Pattern Recognition Group
%     All rights reserved               Faculty of Applied Physics
%                                       Delft University of Technology
%                                       Lorentzweg 1
%                                       2628 CJ Delft
%                                       The Netherlands
%
% Cris Luengo, 25 June 2008.
