mtex icon indicating copy to clipboard operation
mtex copied to clipboard

added option for minPixel

Open vedadb opened this issue 1 year ago • 1 comments

Added option "minPixel" not to need to do Option 1. Option 2. just skips the generation of grains object so slight speed up. (performs the same tesselation first run as second) Option 3 and 4 perform first modified tesselation/graincalculation first run - either as scalar ebsd map (spatialDecomposition.m) or unit cell, and they produce the same grain map. - "major speed up". Please try

e = ebsd; e= e.gridify; e1 = e;

Option 1: tic [g,e.grainId] = calcGrains(e); e(g(g.grainSize<5)) = []; e=e.gridify; g=calcGrains(e); toc

Option 2: tic g1 = calcGrains(e1,'minPixel',5); toc

Option 3: tic g2 = calcGrains(e1,'minPixel',5,'byScalar'); toc

Option 4: tic g3 = calcGrains(e1,'minPixel',5,'byUnitCell'); toc

% Elapsed time is 29.616039 seconds. % Elapsed time is 28.059836 seconds. % Elapsed time is 19.381225 seconds. % Elapsed time is 17.654077 seconds.

%
% Phase Grains Pixels Mineral Symmetry Crystal reference frame % 1 3401 635157 Copper m-3m

% g1 = grain2d %
% Phase Grains Pixels Mineral Symmetry Crystal reference frame % 1 3401 635157 Copper m-3m
%

% g2 = grain2d %
% Phase Grains Pixels Mineral Symmetry Crystal reference frame % 1 3347 634138 Copper m-3m

% g3 = grain2d %
% Phase Grains Pixels Mineral Symmetry Crystal reference frame % 1 3347 634138 Copper m-3m

vedadb avatar Mar 13 '24 15:03 vedadb