Hi Jeremy,
The prominence field in "Find Maxima" is labeled "Prominence >" value.
If the peak height is exactly 1.0 and you specify "Prominence > 1" it
won't qualify as a peak.
But: If you don't specify "Strict", and if the image has at least one
local maximum, "Find Maxima" will find the highest local maximum.
(In the current case, there are two local maxima with equal pixel
values, so only one of these local maxima will be found. You could have
hundreds of peaks all with a value = 1, and only one will be found if
you specify "prominence > 1", but not "strict". In this case, the one
selected will be the one closest to the center of mass of all these
maximum pixels.)
(2) Sorry, currently I see no way to set the position of the pixel
inspection tool from a macro.
Of course, one could write macro code that prints the pixel values in a
given neighborhood as a table.
Michael
________________________________________________________________
On 22.10.24 09:08, Jeremy Adler wrote:
1. FInd Maxima
This code produces 2 maxima, as you would expect
newImage("Untitled", "8-bit black", 16, 16, 1);
val=2;
setPixel(2, 2, val);
setPixel(12, 12, val);
run("Find Maxima...", "prominence=1 output=[Point Selection]");
but when val=1 there is only one maxima.
2) Pixel Inspection Tool.
Within a macro is it possible to specify a position for the tool?
It would be useful when trying to track down a problem.
Jeremy
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html