/* This macro should be placed in the ImageJ>macro>toolsets folder so as to appear in the toolbar >> section * This click tool creates a circular ROI of defined radius center on the point of the clic, add this circular ROI to the ROI manager and run a measurement in this ROI. * With stacks it goes automatically to the next slice. * The radius of the circular ROI can be set by right clicking or double clicking on the tool icon * The choice of measurements should be set in the Analyse > Set Measurements... prior to the successive click * The best is to set the options "Associate ROI with slices" of the ROI manager (More>Options) * The ROI set and measurement table should be manually saved after use. */ var radius = 20; macro "ROI circle Tool - C00cO11cc" { getCursorLoc(x, y, z, flags); //print("Sample: "+x+" "+y); if ((flags==16)|(flags == 48)){ // 16 : left click or 48 = 16 + 32 Left-click + in a ROI makeOval(x-radius, y-radius, 2*radius, 2*radius); // Draw the circle of given radius using the points from ROI manager as center roiManager("Add"); // Add the circle to the ROI manager run("Measure"); // Measure the value of interest in the drawn ROI run("Next Slice [>]"); } } macro "ROI circle Tool Options" { radius = getNumber("Radius: ", radius); }