% This function is part of the NMSM Pipeline, see file for full license.
%
% Parses XML settings for a RCNLPathConstraintTerms, adding all fields 
% included in the xml block.  
%
% (struct) -> (struct)
% Parses settings from a RCNLPathConstraintTerms.
function path = getPathConstraintTerms(tree)
pathConstraintTermsTree = getFieldByName(tree, ...
    'RCNLPathConstraintTerms');
if(isstruct(pathConstraintTermsTree))
    pathConstraints = getFieldByName(pathConstraintTermsTree, ...
        'RCNLConstraintTerm');
    if isstruct(pathConstraints) || iscell(pathConstraints)
        path = parseRcnlConstraintTermSet(pathConstraints);
    else
        path = {};
    end
else
    path = {};
end
end