MechMicroMan / DefDAP

A python library for correlating EBSD and HRDIC data
Apache License 2.0
35 stars 16 forks source link

Retrieving raw image for each grain #24

Open JQFonseca opened 5 years ago

JQFonseca commented 5 years ago

How difficult would it be to link the the raw image to the grain segmented via EBSD? For example, we might like to see how the slip interacts with features in the raw image (particles, second phases etc.) Claudius and I could work on this but it would be good to know how hard you think it would be.

mikesmic commented 5 years ago

This shouldn't be too difficult to implement, there are already functions to show the entire pattern images for setting the homologous points. Take a look at hrdic.Map.setPatternPath and hrdic.Map.plotPattern, just a note that the images need to shift corrected the same as the dic map data.

From there you can implement a new method in hrdic.Grain to either just show an image cropped to a box around the grain or have the grain properly masked - take a look at base.Grain.extremeCoords or base.Grain.grainOutline which will help. There output will need to be adjusted by the window size set when loading the pattern (take a look at hrdic.Map.crop for example). Another note that all the coordinates are set for the image after it has been cropped.

If you do end up adding code please could you do it on a new branch from develop, as it is significantly ahead of master now

rhysgt commented 4 years ago

Might be good to move the handling of BSE images to a separate class. There are cases where it's useful to be able to check the BSE image for a given grain. Would also be very useful to have grain boundary overlay on the BSE image to check alignment.