% FROMFILTERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FUNCTION:    fromFilters
%
% DESCRIPTION: Construct an filterbank from a set of filters
%
% CALL:        fb = fromFilters(fb, pl)
%
% PARAMETER:   pl   - plist
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function obj = fromFilters(obj, pli)
  
  VERSION = '$Id: fromFilters.m,v 1.6 2011/08/15 13:40:33 hewitson Exp $';
  
  % get filterbank info
  ii = filterbank.getInfo('filterbank', 'From Filters');
  
  % Set the method version string in the minfo object
  ii.setMversion([VERSION '-->' ii.mversion]);
  
  % Combine input plist with default values
  pl = applyDefaults(ii.plists, pli);
  
  % Set fields
  filters  = pl.find('filters');
  type     = pl.find('type');
  
  obj.filters = copy(filters,1);
  obj.type    = type;
  
  % Add history
  obj.addHistory(ii, pl, [], []);
  
  % Set object properties
  obj.setObjectProperties(pl);
  
end
