Login  Register

Re: finding the location of the brightest pixel(s)

Posted by Herbie on Mar 14, 2016; 5:42pm
URL: http://imagej.273.s1.nabble.com/finding-the-location-of-the-brightest-pixel-s-tp5015879p5015897.html

Dear Gabriel,

good to hear that you are thinking about taking steps...

One way to return array values is per file which is clumsy.
(Save from PlugIn, pass address to Macro, read by Macro.)

Another, perhaps a little less clumsy way is to write from the PlugIn to
the results table and read from there by the Macro using "getResults()",
"String.copyResults" etc.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::::
Am 14.03.16 um 17:43 schrieb Gabriel Landini:

> On Monday 14 Mar 2016 15:38:38 Jeremy Adler wrote:
>> 3) The Histogram and the getMinandMax macro command do all that is required
>> to find the location of the most intense pixel(s), except to save the
>> location(s) and I am suggesting that maybe one of them could be tweaked to
>> also return the location- in  two arrays holding the X and Y coordinates. A
>> simple Find MaxLocations  might be of sufficient utility include in ImageJ.
>
> Why restrict the procedure to the maximum?
> A better option is to create a plugin that scans the image and dumps the
> coordinates of a specified value to an array or the Results table.
>
> That way you can use it to also the specify the coordinates of pixels with
> minimum, mode, etc.
>
> Something like FindLocations(value) and returns two arrays.
>
> What I do not know, how to do is returning the arrays to the macro language.
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html