Find Maxima output

Hello,

How can I check if the output of Find Maxima is empty, in order to get the point coordinates? Something like this…

run("Find Maxima...", "prominence=100 strict exclude light output=[Point Selection]");	
if(output.length>0){			
      Roi.getCoordinates(xpoints, ypoints);
}

Thanks in advance

Mafalda

I usually check the count you can get this via the results table:

run("Find Maxima...", "prominence=100 exclude light output=Count");
count = getResult("Count", 0);

if (count > 0)  {
}

Hi,

well, Results table is being used to store another information. Is there another way?

Thks

In the macro language everything is kind of tied to the Results table as output.
You could rename the other results table and circumvent this problem.

Cheers,
Christopher

1 Like

You could check to see you have a selection on your image or not with something like

if(selectionType()! = -1){
  Roi.getCoordinates(xpoints, ypoints);
}
3 Likes