checkInside edit page

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
grains = calcGrains(ebsd('indexed'))
plot(grains(grains(75).checkInside(grains)))

See also

EBSD.findByLocation grain2d.findByOrientation