Re: Image analysis
Posted by ImreBorsi on Jul 06, 2015; 3:16pm
URL: http://imagej.273.s1.nabble.com/Image-analysis-tp5013423p5013432.html
this code works on 1 line !!!
But does not with multiple lines in ROI!
Please help me !!
macro "line [v]"
{
run("Interpolate", "interval=1");
getSelectionCoordinates(x, y);
for(befi = 0,ai=0,i=0 ;i<x.length; i++)
{
ix=round(x[i]);
iy=round(y[i]);
if (getPixel(ix,iy) == 0)
{
ai++;
befi++;
}
else
{
ai=0;
}
if (ai == 0 && befi != 0)
{
print(befi);
befi=0;
}
}