Scripting Resources for DigitalMicrograph™

banner

Dave Mitchell's DigitalMicrograph™ Scripting Website

Home | Scripts | Examples | Functions | Recent Updates | Tutorials | Resources | Publications | Consulting | Projects | Contact & Bio |PyJEM| Search

 

Atom Colouriser
Function
Fits a lattice of circles to an experimental high resolution HAADF image which can then be colourised to highlight defects etc.
Version
version:20222027, v1.1
Author
D. R. G. Mitchell
Acknowledgements
Thanks to Azdiar Gazder for suggesting and testing this script
Comments

This script is derived from the Distortion Correction script. It allows a lattice of circles to be created and stretched/skewed/rotated to fit the atomic column positions in a high resolution HAADF image. The circles are then individually fitted to their respective atomic columns to define the position precisely. Individual circles, groups of circles or the entire lattice can then be selected and colourised. This may be useful for highlighting defects, boundaries, strained regions etc. The script allows a Mask Image to be extracted where the lattice of colourised circles is duplicated on a black background.

Updated in v1.1. to address minor issues introduced by GMS 3.x

System Requirements
Tested on GMS 2.32 and GMS 3.2. Works on the front-most image which should be a spatially calibrated high resolution HAADF image in which the atomic column positions are clearly resolved.
Known Issues

Images used must of type integer or real. RGB images will need to be converted to these formats. Pressing the ? button in the dialog will print detailed instructions into the Output (Results) window.

Atomic columns must be clearly resolved to allow circles to be drawn around those positions without overlapping with circles on neighbouring columns or other lattice spots. Filtering the image beforehand using FFT methods or via Maximum Entropy or Richardson-Lucy filters may enhance the image contrast and make this script easier to apply.

The colourising part of this script simply looks for circles (oval annotations) on the front-most image. Existing ovals can be copy and pasted individually or en masse and then manually positioned to define secondary lattices or spots outside the grid of circles created automatically. The Refine routine for fitting circles to columns can be invoked repeatedly to refine positions iteratively. Where fitting fails, eg due to poor contrast or indistinct features, such circles can be manually positioned.

The size at which the image is displayed can be changed by clicking on the Tools button and setting the Image Display Width (in pixels).

Supported
Yes
Included Files
Main script file.
Source Code

See attached script file