source: MML/trunk/applications/database/mym/dbm/@FilteredDB/tableNew.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 713 bytes
Line 
1function a_f = tableNew(a_f, a_colname, a_parentImg, a_parentFilter, varargin)
2
3if ~isa(a_parentImg, 'BasicDB')
4  error('expect the first parent to be an image database')
5end
6if ~iscell(a_parentFilter)
7  a_parentFilter = {a_parentFilter};
8end
9for i = 1:numel(a_parentFilter)
10  if ~(isa(a_parentFilter{i}, 'FilterDB')||isa(a_parentFilter{i}, 'ParFilterDB'))
11    error('expect the second parent to be a filter database')
12  end
13end
14
15if any(strcmp(varargin, 'TAG'))
16  error('tag: cannot be overriden')
17end
18
19if any(strcmp(varargin, 'PARENTS'))
20  error('parents: cannot be overriden')
21end
22
23a_f.BasicDB = tableNew(a_f.BasicDB, a_colname, 'TAG', 'FilteredDB',...
24  'PARENTS', a_parentImg, a_parentFilter{:}, varargin{:});
Note: See TracBrowser for help on using the repository browser.