boundary length per grain including holes
grains.boundary.perimeter
% include subgrain boundaries grains.boundary.perimeter + grains.innerBoundary.perimeter
gB = grains.boundary('Iron','Iron');
% length of low angle boundary per grain gB(gB.misorientation.angle < 15*degree).perimeter
% length of special boundaries per grain gB(gB.isTwinning(CSL(3))).perimeter
Grain2d.perimeter