Grains selection within a polygonal region of interest #743
Answered
by
zmichels
Remsdel
asked this question in
Ask Anything
Replies: 1 comment
-
Yes, you can do this. Check out these pages:
You can use the “inpolygon” function for identifying a subset of grains
https://mtex-toolbox.github.io/grain2d.inpolygon.html <https://mtex-toolbox.github.io/grain2d.inpolygon.html>
This page includes an example of how to use Matlab’s ginput() to get points from clicking on a plot.
https://mtex-toolbox.github.io/grain2d.findByLocation.html <https://mtex-toolbox.github.io/grain2d.findByLocation.html>
Using ginput() you can click to define the corners of a region. Then use the result with inpolygon() to find the grains.
Cheers,
Zach
… On Feb 3, 2021, at 8:49 AM, Remsdel ***@***.***> wrote:
Hello,
I am dealing with an EBSD map containing a large amount of grains that I would like to separate in three sub-groups. The selection must be made manually based on a grain elemental enrichment that is obtained from another type of mapping (so not embedded in the EBSD data). One can of course select grain individually (selectInteractive function) by clicking on them. However when hundreds of grains have to be selected, this is particularly tedious. I was therefore looking for a function similar to the roipoly matlab function where the user draws a polygonal region of interest over an image to select all pixels within the ROI boundary (in my specific case, grains with specific enrichment tend to be grouped together so could be selected by delineating the boundaries of the 'group'). A similar function in MTEX where all grains within the user-defined ROI boundary could be selected would be very useful. There might be already a way to do something like this but I have notfound it. There would be of course the issue of the grains that are astride the ROI polygon boundaries (whether to count them in or out) but that should be solvable. Any help would be welcome.
RD
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#743>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACC5AU347N7ESBO5ULYOQDTS5FO6DANCNFSM4XA7NRZA>.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ralfHielscher
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am dealing with an EBSD map containing a large amount of grains that I would like to separate in three sub-groups. The selection must be made manually based on a grain elemental enrichment that is obtained from another type of mapping (so not embedded in the EBSD data). One can of course select grain individually (selectInteractive function) by clicking on them. However when hundreds of grains have to be selected, this is particularly tedious. I was therefore looking for a function similar to the roipoly matlab function where the user draws a polygonal region of interest over an image to select all pixels within the ROI boundary (in my specific case, grains with specific enrichment tend to be grouped together so could be selected by delineating the boundaries of the 'group'). A similar function in MTEX where all grains within the user-defined ROI boundary could be selected would be very useful. There might be already a way to do something like this but I have notfound it. There would be of course the issue of the grains that are astride the ROI polygon boundaries (whether to count them in or out) but that should be solvable. Any help would be welcome.
RD
Beta Was this translation helpful? Give feedback.
All reactions