Posted by
Michael Schmid on
Jan 14, 2017; 4:55pm
URL: http://imagej.273.s1.nabble.com/Is-there-a-way-to-find-the-brightest-area-in-a-predefinded-area-tp5017892p5017898.html
Hi Mauci,
yes, I agree with Herbie's solution, and here is a bit on the
implementation in ImageJ:
For convolution with the circle, simply Run Process>Filters>Mean with
the radius of choice (small circle radius). You can see the exact size
of the circular areas for given radii with Process>Filters>Mean.
Set everything outside the selection to zero (Edit>Selection>Make
Inverse; Process>Math>Set), and invert the selection again, to have
nothing in the image that could be larger than the maximum in the region
of interest.
For finding the maximum, you can now use Find Maxima with a large value
of the tolerance (something that is certainly larger than the highest
pixel value in your image; in case of doubt, use, e.g., 1.0e30). Then it
simply reports the highest pixel in the image.
--
If you need this for the average of a given stack slice and the adjacent
ones, the easiest thing would be starting with running
Process>Filters>Mean 3D, with a radius of 0 in x and y and 1 in z.
(For the first and last slice, this will create a two-slice average)
Michael
________________________________________________________________
On 2017-01-14 17:12, Herbie wrote:
Dear Maurice,
if, as you write now, the size of the second (circular) region is
given, a solution is possible.
Here is a suggestion that works for me:
1.
Make a (circular) selection according to the first (circular) region
(ROI).
2.
Convolve with a (circular) disc function that corresponds to your
second region.
3.
Determine the maximum location of the resulting signal in the ROI.
4.
The maximum marks the center of the desired second (circular)
region,
i.e. of the region with the maximum mean value.
HTH
Herbie
:::::::::::::::::::::::::::::::::::
Am 14.01.17 um 16:22 schrieb Mauci:
Thanks for your reply!
So, what I want to get is the following:
1. I want to select an area in my file, so that the measurements
only take
place there. (because I want to analyse different objects in my
file)
2. In this selected area I want to find the area of a predefined
size
(bigger than one pixel) with the highest mean.
So, lets assume my object has an area of 10, but my measurements
should just
have the area of 1. So I will circle my object and I want ImageJ
to find the
perfect position for my smaller circle, so that it has the
highest mean.
So far I did that manually, but of course this isn't perfect and
it takes a
lot of time to do that.
Would you know a solution for that?
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html