Cutting a EBSD Map

78 views
Skip to first unread message

Camilo Garzón

unread,
Apr 24, 2019, 1:38:26 PM4/24/19
to MTEX
Hi,

I need help cutting an EBSD map as people did before in this example


However, when I try to do it, the background disappears and just remains the contour of the polygon.

Could it be an issue of the 5.2 version of MTEX or there is a new way to do this?

Best Regards

fili...@gmail.com

unread,
Apr 25, 2019, 4:14:27 AM4/25/19
to MTEX
Hi!
It works here. Can you confirm that you are using the following code:

mtexdata forsterite

region
= [5 2 10 5]*10^3;

close all

plot
(ebsd)

rectangle
('position',region,'edgecolor','r','linewidth',2)

condition
= inpolygon(ebsd,region);

ebsd
= ebsd(condition)

figure

plot
(ebsd)


If it doesn't work, check also number 2 here: https://groups.google.com/forum/#!topic/mtexmail/adn2k7Vpt70

Best,

Filippe

Camilo Garzón

unread,
Apr 25, 2019, 4:56:35 PM4/25/19
to MTEX
Hi Filippe,

I did exactly the same procedure and it didn't work.

So, I tried your second suggestion, after that, the MTex didn't plot anymore, so I had to close and open matlab to fix this new issue.

Don't you know another way to cut?

Thanks

fili...@gmail.com

unread,
Apr 26, 2019, 4:28:05 AM4/26/19
to mtex...@googlegroups.com
Hi! 

If I understood correctly, the first plot is normal and only the cropped one is not showing, right? Is there any error message?

After using 
ebsd=ebsd(condition)
in the above code

what does 
ebsd
return? Is it empty?

Other way of cutting would be to restrict data within given coordinates, e.g.:

mtexdata forsterite

figure; plot(ebsd)


x1=5*10^3;

y1=2*10^3;

x2=15*10^3;

y2=7*10^3;


ebsd=ebsd(ebsd.prop.x>x1 & ebsd.prop.y>y1 & ebsd.prop.x<x2 & ebsd.prop.y<y2)

figure; plot(ebsd)


Best,
Filippe

Camilo Garzón

unread,
May 2, 2019, 11:13:34 AM5/2/19
to MTEX
Hi Filippe,

Thanks for your help again, the second method that you recommend me works to me, however, I was hoping extrapolated this procedure to a grains map; like what I attached; to cut it without having to cut the original EBSD and reprocess the image.

I should be more precise with it before.

Best Regards
EBSD a330.jpg
Reply all
Reply to author
Forward
0 new messages