pyxem / kikuchipy

Toolbox for analysis of electron backscatter diffraction (EBSD) patterns
https://kikuchipy.org
GNU General Public License v3.0
81 stars 30 forks source link

Virtual foreward scattered detector (VFSD) functionality #12

Closed hakonanes closed 4 years ago

hakonanes commented 5 years ago

Create functions (or a dedicated VFSD class) to streamline formation of VFSD images. Desired functionality:

  1. Bin signal axis to 5 x 5 pixel pattern
  2. Form images from any number of bins
  3. Form RGB image by coloring three bins

Focus should be on maximising the contrast in each image, by e.g. using histogram equalization (http://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_equalize.html). The latter is related to #14.

tinabe commented 5 years ago

Is interactive plotting something you have in mind for point 3? We could create 3 RGB markers that can be moved around to create a virtual interative image, hopefully by inheriting from pyxem or HS.

A simple solution would be to input 3 numbers corresponding to which pixels to use for each of the RGB channels. I think this should be used for point 2 in your list, at least.

hakonanes commented 5 years ago

Yes, it would be ideal if the image formation function could take in either of:

  1. Bin index (say (3, 3) for the centre bin, if 5 x 5 bins)
  2. List of bin indices
  3. One hyperspy.roi.BaseInteractiveROI
  4. Multiple hyperspy.roi.BaseInteractiveROI

If a list of bin indices or ROIs are passed, the user should also be able to determine if they should be colored and in what color (a three element list for each image, or simply 'R', 'G' or 'B').

hakonanes commented 5 years ago

After discussions with Jarle Hjelen: a forth feature could be creating VFSD images from two vertical rectangles on either side of the detector and subtract or add them to enhance topographical contrast similar to humans' stereopsis (binocular vision, https://en.wikipedia.org/wiki/Binocular_vision#Stereopsis).

hakonanes commented 5 years ago

A way to test this functionality against commercial solutions is to compare our results to:

Since Bruker has a FSD, I guess the best way to test is towards TSL's datasets.

hakonanes commented 5 years ago

Relevant literature (updated as more is found):

hakonanes commented 4 years ago

This functionality is largely supported with:

What we should have is a version of pyXem's VDFGenerator to streamline typical results desired. Typical results include RGB image from three bins in a 5 x 5 px detector (as done in the above referenced paper by Wrgith et al. (2015)), phase contrast image (upper part of detector) and topography contrast image (lower part of detector).

hakonanes commented 4 years ago

The 5 x 5 array is very similar to Aimo Winkelmann's 7 x 7 arrays in the aloe/xcdskd project:

We should focus on his implementation, perhaps let the user determine how fine the array should be.

This array should be its own class... with the different imaging possibilities showcased in the example usage link as methods? This way other possible signals can use the same class, not just EBSD.

hakonanes commented 4 years ago

Although not that automated, all these things are possible, with some know-how, via kikuchipy.signals.ebsd.EBSD.virtual_backscatter_electron_imaging() and kikuchipy.signals.ebsd.EBSD.get_virtual_image().