check for points or grains to be inside a big grain
Description
Note, for an EBSD pixel to be inside a grain it has to be completely inside the grain. Pixels at the boundary may belong to no grain.
Syntax
isInside = checkInside(hostGrains, [x,y])
isInside = checkInside(hostGrains, inclusionGrains)
isInside = checkInside(hostGrains, ebsd)Input
| hostGrains | grain2d | 
| inclusionGrains | grain2d | 
| [x,y] | list of [x(:) y(:)] coordinates | 
Output
| isInside | numInclusionGrains x numHostGrains matrix | 
| isInside | numEBSD x numHostGrains matrix | 
| isInside | numXY x numHostGrains matrix | 
Options
| includeBoundary | points on the boundary are considered as inside | 
| ignoreInclusions | points within inclusions belong to the host grain | 
Example
mtexdata small silent
grains = calcGrains(ebsd('indexed'));
plot(grains(75))
hold on
plot(grains(grains(75).checkInside(grains)),'facecolor','red')
hold off