Login  Register

get selection perimeter in macro

Posted by Michael Doube on Feb 25, 2008; 5:33pm
URL: http://imagej.273.s1.nabble.com/get-selection-perimeter-in-macro-tp3697084.html

Hi All

I'd like to return the perimeter of a wand selection as a variable in my
macro.  So far, all I can get is

getSelectionCoordinates(xCoordinates, yCoordinates);
perimeter = lengthOf(xCoordinates);

which is not correct as edge pixels should be counted as sqrt(2).

How can I get a similar result to:
*getTracedPerimeter()

in a macro?

Mike*