Is there a way to find the brightest area in a predefinded area?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to find the brightest area in a predefinded area?

Mauci
Hello!

I'm looking for a way to select an area in ImageJ and then to automatically get the area within the selected area with a predefined size with the highest mean.

So for example: I have an object and I draw a circle around it, then I want ImageJ to give me a smaller circle within my drawn circle that has the highest mean in this area.

Since I have to analyse a Z-stack it would be great if I could include 1 Z in each direction into my measurements.

Thanks for your answers!

-Maurice
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find the brightest area in a predefinded area?

Herbie
Good day Maurice,

if I understand correctly, the result of what you describe will
necessarily be a "smaller circle" containing only one pixel, namely that
of maximum value (which of course is its mean as well) in the first circle.

I fear that this is not what you want. Thus you need to provide more
information about what you really want.

Best

Herbie

:::::::::::::::::::::::::::::::::::
Am 14.01.17 um 12:55 schrieb Mauci:

> Hello!
>
> I'm looking for a way to select an area in ImageJ and then to automatically
> get the area within the selected area with a predefined size with the
> highest mean.
>
> So for example: I have an object and I draw a circle around it, then I want
> ImageJ to give me a smaller circle within my drawn circle that has the
> highest mean in this area.
>
> Since I have to analyse a Z-stack it would be great if I could include 1 Z
> in each direction into my measurements.
>
> Thanks for your answers!
>
> -Maurice
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Is-there-a-way-to-find-the-brightest-area-in-a-predefinded-area-tp5017892.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find the brightest area in a predefinded area?

Herbie
In reply to this post by Mauci
Good day Maurice,

if I understand correctly, the result of what you describe will necessarily be a "smaller circle" containing only one pixel, namely that of maximum value (which of course is its mean as well) in the first circle.

I fear that this is not what you want. Thus you need to provide more information about what you really want.

Best

Herbie

:::::::::::::::::::::::::::::::::::
Am 14.01.17 um 12:55 schrieb Mauci:
> Hello!
>
> I'm looking for a way to select an area in ImageJ and then to automatically
> get the area within the selected area with a predefined size with the
> highest mean.
>
> So for example: I have an object and I draw a circle around it, then I want
> ImageJ to give me a smaller circle within my drawn circle that has the
> highest mean in this area.
>
> Since I have to analyse a Z-stack it would be great if I could include 1 Z
> in each direction into my measurements.
>
> Thanks for your answers!
>
> -Maurice
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find the brightest area in a predefinded area?

Mauci
In reply to this post by Herbie
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?
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find the brightest area in a predefinded area?

Herbie
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?
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Is-there-a-way-to-find-the-brightest-area-in-a-predefinded-area-tp5017892p5017896.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find the brightest area in a predefinded area?

Michael Schmid
In reply to this post by Mauci
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