Practical Electron Microscopy and Database

An Online Book, Second Edition by Dr. Yougui Liao (2006)

Practical Electron Microscopy and Database - An Online Book

Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

Check for Presence of Colored Line Annotations in Image

This script here is designed to verify the presence of specific colored line annotations—namely red, green, blue, black, and white—within a digitally annotated image in Gatan DigitalMicrograph. It programmatically scans all line annotations on the frontmost image and compares their RGB values against predefined thresholds for each target color. A tolerance margin is applied to account for slight variations in color values. If at least one annotation of each specified color is found, the script outputs “Yes” in the Results window; otherwise, it reports “No.” This tool is particularly useful for automating color-based verification steps in annotation workflows and ensuring consistent labeling practices across datasets.