grainBoundary.order edit page

bring the boundary segments into walk order

Description

Reorders the boundary segments such that consecutive segments of the same chain share a vertex, i.e. gB.F(k,2) == gB.F(k+1,1). A chain is a maximal run of segments joined at vertices where exactly two segments meet; a vertex where any other number of segments meet is a junction and always terminates a chain. Chains occupy contiguous blocks of rows.

Each chain is additionally oriented such that the grain in gB.grainId(:,1) lies to the left of the walk direction. Which side that is cannot be derived from gB alone, so it has to be supplied via the leftPos option - one point per segment lying strictly on the grainId(:,1) side of it. For segments along the outer border, where grainId(:,1) is 0 and no such pixel exists, mirror the pixel of the other side through the segment midpoint. Without leftPos the walk order is still established, but the sense of each chain is arbitrary (deterministic, but not tied to grainId).

Syntax

gB = order(gB)
gB = order(gB,'leftPos',pos)
[gB,p] = order(gB)

Input

gB grainBoundary
pos vector3d, one per segment, on the gB.grainId(:,1) side of it

Output

gB grainBoundary, in walk order
p the applied permutation, gB_ordered = gB_old.subSet(p)

See also

chainOrder grainBoundary.grainBoundary grainBoundary.grainBoundary grainBoundary.grainBoundary

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/grainBoundary.order.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.