// This macro batch processes .dm3 images saved with Gatan software // for Transmission Electron Microscope (TEM) imaging. It adds scale bar to each image // and converts them from .dm3 to PNG format (Conversion to TIFF does not work yet). // Author: Amirhossein Khalajhedayati, 12/10/2013, University of California Irvine, USA // Parts of this code were obtained from multiple resources on the web. requires("1.33n"); dir = getDirectory("Choose a directory that contains dm3 files"); list = getFileList(dir); outputDirectory = getDirectory("Choose a directory to save the output files"); start = getTime(); setBatchMode(true); print("\\Clear") for (i=0; i