script_QuadruplePoints edit page
cs = crystalSymmetry('1','mineral','test');


id = [...
  0 0 0 0 0 0; ...
  0 1 1 1 1 0; ...
  0 1 1 1 1 0; ...
  0 1 0 0 1 0; ...
  0 1 0 0 1 0; ...
  0 1 1 1 0 0; ...
  0 0 0 0 0 0]==1;

rot = rotation.id(size(id));

rot(id) = rotation.rand;


ebsd = EBSDsquare([],rot,2*ones(size(rot)),1:2,{'not indexed',cs},[1 1]);
plot(ebsd,ebsd.orientations)
grains = calcGrains(ebsd,'removeQuadruplePoints')
grains = grain2d
 
 Phase  Grains  Pixels  Mineral  Symmetry  Crystal reference frame
     2       2      42     test         1      X||a*, Y||b*, Z||c*
 
 boundary segments: 52 (52 µm)
 inner boundary segments: 0 (0 µm)
 triple points: 0
 
 Id   Phase   Pixels       meanRotation   GOS
  1       2       15   (157°,161°,198°)     0
  2       2       27         (0°,0°,0°)     0
gB = grains.boundary
grains = merge(grains,gB(end),'calcMeanOrientation')
gB = grainBoundary
 
 Segments  length   mineral 1  mineral 2
       26   26 µm  notIndexed       test
       26   26 µm        test       test
 
grains = grain2d
 
 Phase  Grains  Pixels  Mineral  Symmetry  Crystal reference frame
     2       2      42     test         1      X||a*, Y||b*, Z||c*
 
 boundary segments: 52 (52 µm)
 inner boundary segments: 0 (0 µm)
 triple points: 0
 
 Id   Phase   Pixels       meanRotation   GOS
  1       2       15   (157°,161°,198°)     0
  2       2       27         (0°,0°,0°)     0
grains = smooth(grains,1,'moveTriplePoints')
grains = grain2d
 
 Phase  Grains  Pixels  Mineral  Symmetry  Crystal reference frame
     2       2      42     test         1      X||a*, Y||b*, Z||c*
 
 boundary segments: 52 (50 µm)
 inner boundary segments: 0 (0 µm)
 triple points: 0
 
 Id   Phase   Pixels       meanRotation   GOS
  1       2       15   (157°,161°,198°)     0
  2       2       27         (0°,0°,0°)     0
plot(grains.boundary)
id = 2;
gB = grains(id).boundary;

plot(gB,gB.curvature(10),'linewidth',6)

mtexColorMap blue2red
setColorRange(0.5*[-1,1])