function PMTemplate=MSR2point_model_template(PMTemplate,MSR)
    if numel(MSR.OBJECT)>1
        error(sprintf('Number of objects in MSR = %d',numel(MSR.OBJECT)))
    end
    msr=MSR.OBJECT{1};
    pts_xyz=msr.VERT';
    PMTemplate.pts=pts_xyz(:)
    loops=msr.EDGE;
    PMTemplate.loops={loops};
    PMTemplate.direc='Templates';
    PMTemplate.imageName=imageName;
    PMTemplate.imageDir='Templates';
    PMTemplate.name=name;
    msr=MSR.OBJECT{1};
    primaries=[];
    if isfield(msr,'VERTLABEL')
        for i=1:length(msr.VERTLABEL)
            if ~isempty(msr.VERTLABEL{i})
                if strcmpi(msr.VERTLABEL{i},'Primary')
                    primaries(end+1)=i;
                end
            end
        end
    end
    PMTemplate.primaries=primaries;
end