/** * NeSys_Pixel_Counter_Macro.txt * @version 1.1 * @author e.a.papp at medisin.uio.no * * This ImageJ macro uses the NeSys Pixel Counter plugin to record * the number of black pixels in a series of (binary) images. The images * are expected to be within the same directory. * * Results are saved in tab-delimited format containing the filename and * the number of black pixels for each image. * * Requirements: * - ImageJ version 1.45o or later * - NeSys Pixel Counter plugin installed (NeSys_Pixel_Counter.class in ImageJ/plugins) * - Images should be in one of the following formats: * .gif, .jpg, .jpe, .jpeg, .png, .tif, .tiff, .bmp, .pgm * * This macro is part of a workflow for automated detection of axonal labeling * in series of microscopic images. See the ImageJ DokuWiki for details: * http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:autodetection_of_neuronal_labeling_in_histological_image_series:start */ imgdir = getDirectory("Choose Image Directory "); list = getFileList(imgdir); setBatchMode(true); run("Clear Results"); for (i=0; i