Measuring between point selections in a stack

Posted by edsimmons on
URL: http://imagej.273.s1.nabble.com/Measuring-between-point-selections-in-a-stack-tp3683079.html

Hi ImageJ world,

Please could someone point me in the right direction?

I have acquired a stack of images with progressively higher magnification at each level. Each image is a white background with two dots.
Using a macro I found on the mailing list I have managed to get as far as locating the points of interest with find maxima, then add these to the ROI manager.

for(i=0;i<nSlices();i++){
setSlice(i+1);
run("Find Maxima...", "noise=45 output=[Point Selection] exclude light");
run("ROI Manager...");
roiManager("Add");
}
run("Set Measurements...", "  centroid display redirect=None decimal=3");
roiManager("Deselect");
roiManager("Measure");

This works sufficiently well that only the two points of interest are selected and the results window is populated with a list of the coordinate locations of the points, two results per slice.

Please could someone suggest a simple method of measuring the distance in pixels between the two point selections, one result per slice? I'm not quite sure how best to access the locations of the selections.

I have tried a number of methods based on macros found on the mailing list but I'm not quite getting it right.

Any help greatly appreciated, thanks in advance!

Ed