/* Macro to mark the center of a Region Of Interest. Michael.Cammer@med.nyu.edu v100 20150522_1228 simply puts an overay cross over the centroid calculated using the measurements function. Later versions could do other things... */ macro "Mark Center of Object (nondestructive) [q]" { radius = 7; run("Set Measurements...", "area centroid limit display redirect=None decimal=2"); run("Measure"); xc = getResult("X", nResults()-1); yc = getResult("Y", nResults()-1); toUnscaled(xc, yc); makeLine(xc, yc-radius, xc, yc+radius); run("Add Selection..."); makeLine(xc-radius, yc, xc+radius, yc); run("Add Selection..."); run("Select None"); }