merge edit page

merge grains along special grain boundaries

Whenever two grains share a grain boundary that is in the list gB both grains are merged and the common grain boundary is removed. All the properties of the unmerged grains are removed in the merged grains, since there is no common convention for a mean. In case of merging allong small angle grain boundaries one can force MTEX to compute a new meanOrientation using the option calcMeanOrientation.

Syntax

[grainsMerged,parentId] = merge(grains,gB)
% compute new meanOrientations for the grains
[grainsMerged,parentId] = merge(grains,gB,'calcMeanOrientation')
[grainsMerged,parentId] = merge(grains,M)
[grainsMerged,parentId] = merge(grains,tpList)
% merge by a list of pairs of grainIds
[grainsMerged,parentId] = merge(grains,gid)
% merge grains with small misorientation angle
[grainsMerged,parentId] = merge(grains,'threshold',delta)
% merge all inclusions with a maximum pixel size
[grainsMerged,parentId] = merge(grains,'inclusions','maxSize',5)

Input

grains grain2d
boundary grainBoundary
M merge matrix M(i,j)==1 indicates the grains to be merged
tpList triplePointList
gid n x 2 list of grainIds

Output

grainsMerged grain2d
parentId a list of the same size as grains containing the ids of the merged grains

Options

threshold maximum misorientation angle to be merged as similar
maxSize maximum number of pixels to be merged as an inclusion

Example

mtexdata small
grains = smooth(calcGrains(ebsd))
saving data to /home/hielscher/mtex/master/data/small.mat
 
ebsd = EBSD
 
 Phase  Orientations     Mineral         Color  Symmetry  Crystal reference frame
     0    1197 (32%)  notIndexed                                                 
     1    1952 (52%)  Forsterite  LightSkyBlue       mmm                         
     2    290 (7.8%)   Enstatite  DarkSeaGreen       mmm                         
     3    282 (7.6%)    Diopside     Goldenrod     12/m1       X||a*, Y||b*, Z||c
 
 Properties: bands, bc, bs, error, mad, x, y
 Scan unit : um
 
 
grains = grain2d
 
 Phase  Grains  Pixels     Mineral  Symmetry  Crystal reference frame
     0     292    1197  notIndexed                                   
     1      50    1952  Forsterite       mmm                         
     2      61     290   Enstatite       mmm                         
     3      62     282    Diopside     12/m1       X||a*, Y||b*, Z||c
 
 boundary segments: 2775 (123963 µm)
 inner boundary segments: 0 (0 µm)
 triple points: 187
 
 Properties: meanRotation, GOS