
%
% function [] = UpdateAllTemplates(root_dir)
%
%
% Dr. A. I. Hanna (14-07-2005)
function [] = UpdateAllTemplates(root_dir)
files = findfiles('temp_dat', root_dir);
for i=1:length(files)
template = load(files{i}, '-mat');
template = template.PMTemplate;
%if ~isfield(template, 'labels')
template = struct(template);
    PMTemplate = PointModelTemplate;
    old_fields = fieldnames(template);
    for f = 1:length(old_fields)
        template
        PMTemplate = set(PMTemplate, old_fields{f}, getfield(template, old_fields{f}));
    end
%end
save(files{i}, 'PMTemplate');
end

        





