// This macro draws the Feret's Diameter, the longest distance between any two points // along the ROI boundary. Feret's Diameter is also known as the caliper length. // "Feret's Diameter" is a standard measurment option in ImageJ 1.29n and later. drawFeretsDiameter(); macro "Blobs Demo" { run("Blobs (25K)"); setThreshold(125, 248); run("Analyze Particles...", "show=Nothing exclude clear record"); drawAllFeretsDiameters(); } macro "Draw Ferets Diameter" { drawFeretsDiameter(); } macro "Analyze Particles and Draw" { run("Analyze Particles...", "show=Nothing exclude clear record"); drawAllFeretsDiameters(); } function drawAllFeretsDiameters() { for (i=0; idiameter) { diameter = d; i1 = i; i2 = j; } } } setForegroundColor(255,127,255); drawLine(xCoordinates[i1], yCoordinates[i1],xCoordinates[i2],yCoordinates[i2]); }