/* * Quantification of Pigmentation Macro * November 15th 2016 * * NOTE: Images must be named in this format: "SESH000_samplename.tiff" * Where [SESH] is constant but [000-999] is the particular session acquired and * [samplename] is whatever your images are called. This is needed to parse out profile names, * and used in the daisy chain correction in the R script. This script will assume the images are named * as above. DO NOT USE "_" IN YOUR IMAGE NAMES, or downstream macros will not work. * */ // directory where images are stored waitForUser("Choose the folder where the images are stored"); dir = getDirectory("Choose a Directory "); count = 1; list = getFileList(dir); for (i=0; i2; t--){ waitForUser(" Define the POSTERIOR edge of Tergite"+t+" just behind the pigment band:\n Draw from posterior midline edge to right-lateral edge so that the center of the line sits on the tergite edge"); getLine(x1,y1,x2,y2,lineWidth); mx = ((x2 + x1)/2); my = ((y2 + y1)/2); makeLine(1, 1, 1, 1); waitForUser(" Define the ANTERIOR edge of Tergite "+t+" at the anterior edge of the pigmented cuticle (a2):\n Draw from anterior midline edge to right-lateral edge so that the center of the line sits on the tergite edge"); getLine(X1,Y1,X2,Y2,lineWidth); mX = ((X2 + X1)/2); mY = ((Y2 + Y1)/2); makeLine(mx,my,mX,mY,ROIwidth); run("Clear Results"); profile = getProfile(); for (c=0; c