mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
281 stars 185 forks source link

Unable to compute grains from EBSD #1044

Closed DorianDepriester closed 3 years ago

DorianDepriester commented 3 years ago

Hello there!

I don't manage to compute grains from EBSD using MTEX 5.7.0, whereas it used to work with the 5.3.0 version. Please, find below some details about my input data.

What do you want to do? Compute grain2d from EBSD

What data do you have? EBSD data

What code do you use? Cu-Ep1-nondeform.zip

CS = {... 
  'notIndexed',...
  crystalSymmetry('m-3m', [3.6 3.6 3.6], 'mineral', 'Copper', 'color', [0.53 0.81 0.98])};
fname = 'Cu-Ep1-nondeform.ctf';
ebsd = EBSD.load(fname,CS,'interface','ctf','convertEuler2SpatialReferenceFrame');
grains=calcGrains(ebsd)

Error Message

Error using  ~= 
Matrix dimensions must agree.

Error in grainBoundary/calcTriplePoints (line 25)
iV = reshape(iV(iV ~= find(itP).').',3,[]).';

Error in grainBoundary (line 123)
      gB.triplePoints = gB.calcTriplePoints(V,grainsPhaseId);

Error in grain2d (line 189)
      grains.boundary = grainBoundary(V,F,I_FDext,ebsd,grains.phaseId);

Error in EBSD/calcGrains (line 77)
grains = grain2d(ebsd,V,F,I_DG,I_FD,A_Db,varargin{:});

What MTEX version do you use? MTEX 5.7.0

Thank you for considering this issue, Regards.

DorianDepriester commented 3 years ago

Actually, I have just noticed this bug is not related to my data, for I do have the same issue with the small example. Maybe a problem with the Matlab version I use (2016a)?

ralfHielscher commented 3 years ago

Yes this issue is related to the Matlab version. I'm not sure whether we need to fix it.

Ralf.

DorianDepriester commented 3 years ago

Ok, thank you Ralf for your quick answer. I will try to update Matlab in order to get a newer version for MTEX.

Side note: I have made small GUI to evaluate the affine transform between two images (possibly EBSD/grain data). I have managed to add it to the "community scripts" section, despite the broken link to for how to do that.

Regards.