Particle counting problem or bug?

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

Particle counting problem or bug?

Robert Niestroj-Pahl
Hi there,

I stumbled across a weird problem or maybe bug... I am using Fiji (latest
updated version) and MacOS High Sierra.

I have a image with dots (RNAScope technique) to count.
I can easily threshold the image and use the particle analysis tool. All is
fine, count is 2300.

But for my actual workflow, I first duplicate the image, use the median
filter Process>Filters>Median... and then subtract the median filtered image
from the original image. This reduces background and S/N ratio.
Then I threshold the image, using auto thresholder and Triangle method.
Then I am using particle analysis tool again and the count is 1 ???? The
image itself looks normal and thresholded.

I tried using manual thresholding and the particle counting worked again....

Bug???





--
Sent from: http://imagej.1557.x6.nabble.com/

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

Re: Particle counting problem or bug?

Straub, Volko A. (Dr.)
Dear Robert,

I suspect that your LUT after processing is inverted and you are counting background rather than your particles of interest. I would suggest to invert your processed image and see whether you get the expected result.

Hope this helps,
Volko

-----Original Message-----
From: Robert Niestroj-Pahl [mailto:[hidden email]]
Sent: 12 April 2018 12:11
To: [hidden email]
Subject: Particle counting problem or bug?

Hi there,

I stumbled across a weird problem or maybe bug... I am using Fiji (latest updated version) and MacOS High Sierra.

I have a image with dots (RNAScope technique) to count.
I can easily threshold the image and use the particle analysis tool. All is fine, count is 2300.

But for my actual workflow, I first duplicate the image, use the median filter Process>Filters>Median... and then subtract the median filtered image from the original image. This reduces background and S/N ratio.
Then I threshold the image, using auto thresholder and Triangle method.
Then I am using particle analysis tool again and the count is 1 ???? The image itself looks normal and thresholded.

I tried using manual thresholding and the particle counting worked again....

Bug???





--
Sent from: http://imagej.1557.x6.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: Particle counting problem or bug?

Robert Niestroj-Pahl
Dear Volko,

thanks for answering, this makes sense! How do I convert the LUT bacK?

regards

Robert



--
Sent from: http://imagej.1557.x6.nabble.com/

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

Re: Particle counting problem or bug?

Michael Schmid-3
In reply to this post by Robert Niestroj-Pahl
Hi Robert,

in case you are thresholding a 32-bit (float) image:

There is a bug in recent ImageJ versions (since 1.51o) that can cause
"Analyze Particles" to fail for 32-bit images. Sometimes it displays one
particle, sometimes nothing, and it can also do an endless loop,
sometimes running out of memory.

Wayne has fixed it yesterday, so please try today's daily build
(Help>Update ImageJ) and let us know whether the problem persists.


Michael
________________________________________________________________
On 12/04/2018 13:11, Robert Niestroj-Pahl wrote:

> Hi there,
>
> I stumbled across a weird problem or maybe bug... I am using Fiji (latest
> updated version) and MacOS High Sierra.
>
> I have a image with dots (RNAScope technique) to count.
> I can easily threshold the image and use the particle analysis tool. All is
> fine, count is 2300.
>
> But for my actual workflow, I first duplicate the image, use the median
> filter Process>Filters>Median... and then subtract the median filtered image
> from the original image. This reduces background and S/N ratio.
> Then I threshold the image, using auto thresholder and Triangle method.
> Then I am using particle analysis tool again and the count is 1 ???? The
> image itself looks normal and thresholded.
>
> I tried using manual thresholding and the particle counting worked again....
>
> Bug???
>
>
>
>
>
> --
> Sent from: http://imagej.1557.x6.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: Particle counting problem or bug?

Straub, Volko A. (Dr.)
In reply to this post by Robert Niestroj-Pahl
Try 'Invert LUT' (Image -> Lookup Tables -> Invert LUT). This inverts the LUT without changing the pixel values (0 is still 0, but is shown now as white rather black). Alternatively, use 'Invert' (Edit -> Invert). This actually inverts the pixel values (e.g. 0 will become 255).

The Particle Analyser actually finds all areas that are shown as white on the image, apparently regardless of their value. So, with a standard grey LUT (i.e. 0=black, 255=white), it will find pixel areas with a value of 255. However, if the LUT has been inverted (i.e. 0=white, 255=black), it finds all the pixel areas with a value of 0.

I never quite understood, why the Pixel Analyzer appears to be more interested in the appearance of the pixel rather than the actual value. Perhaps somebody else can explain this.

Hope this helps,
Volko


-----Original Message-----
From: Robert Niestroj-Pahl [mailto:[hidden email]]
Sent: 12 April 2018 12:38
To: [hidden email]
Subject: Re: Particle counting problem or bug?

Dear Volko,

thanks for answering, this makes sense! How do I convert the LUT bacK?

regards

Robert



--
Sent from: http://imagej.1557.x6.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: Particle counting problem or bug?

Joel Sheffield
In reply to this post by Robert Niestroj-Pahl
I would like to add to the confusion.  This seems to happen some times even
if I use the "blobs" sample:

1. threshold
2. edit>make mask
3. process>binary>watershed (this is to pick up doubles or more)
4. edit>make selection (on the mask)
5.  select original thresholded image and edit>restore selection
6.  run Analyze Particles

some times, I get a proper analysis of the spots, with area, pixel density
etc.

Other times, I get an error message that "the threshold is wrong".  When I
look at the histogram of the image, half of the values have disappeared.

The problem for me is that this approach works some time and then fails on
others, doing the same operation.

Volko might be on to something, since the blobs image is an inverted lut.
--might it relate to the "background" option in threshold?

Joel



Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
URL:  *https://bio.cst.temple.edu/~jbs/ <https://bio.cst.temple.edu/~jbs/>
<http://tinyurl.com/khbouft>*

On Thu, Apr 12, 2018 at 7:11 AM, Robert Niestroj-Pahl <
[hidden email]> wrote:

> Hi there,
>
> I stumbled across a weird problem or maybe bug... I am using Fiji (latest
> updated version) and MacOS High Sierra.
>
> I have a image with dots (RNAScope technique) to count.
> I can easily threshold the image and use the particle analysis tool. All is
> fine, count is 2300.
>
> But for my actual workflow, I first duplicate the image, use the median
> filter Process>Filters>Median... and then subtract the median filtered
> image
> from the original image. This reduces background and S/N ratio.
> Then I threshold the image, using auto thresholder and Triangle method.
> Then I am using particle analysis tool again and the count is 1 ???? The
> image itself looks normal and thresholded.
>
> I tried using manual thresholding and the particle counting worked
> again....
>
> Bug???
>
>
>
>
>
> --
> Sent from: http://imagej.1557.x6.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: Particle counting problem or bug?

Michael Schmid-3
Hi Joel,

It there is a selection, "Analyze Particles" is restricted to the
selected areas.
At the same time, it is also restricted to the thresholded areas.

It may happen that there is no thresholded area inside the selection. In
such a case, you get the message
"No particles were detected The threshold may not be correct"

 > When I  look at the histogram of the image, half of the values have
disappeared.
Yes, this is the desired behavior. If there is a selection, the
histogram in the "Threshold" and "B&C" panels show the histogram of the
selected area.

In your work flow, if there is a problem of black vs. white background
for binary images (defined in Process>Binary>Options), it could be only
at the stage where you have the mask and create a selection from it.


Michael
________________________________________________________________
On 12/04/2018 18:03, Joel Sheffield wrote:

> I would like to add to the confusion.  This seems to happen some times even
> if I use the "blobs" sample:
>
> 1. threshold
> 2. edit>make mask
> 3. process>binary>watershed (this is to pick up doubles or more)
> 4. edit>make selection (on the mask)
> 5.  select original thresholded image and edit>restore selection
> 6.  run Analyze Particles
>
> some times, I get a proper analysis of the spots, with area, pixel density
> etc.
>
> Other times, I get an error message that "the threshold is wrong".  When I
> look at the histogram of the image, half of the values have disappeared.
>
> The problem for me is that this approach works some time and then fails on
> others, doing the same operation.
>
> Volko might be on to something, since the blobs image is an inverted lut.
> --might it relate to the "background" option in threshold?
>
> Joel
>
>
>
> Joel B. Sheffield, Ph.D
> Department of Biology
> Temple University
> Philadelphia, PA 19122
> Voice: 215 204 8839
> e-mail: [hidden email]
> URL:  *https://bio.cst.temple.edu/~jbs/ <https://bio.cst.temple.edu/~jbs/>
> <http://tinyurl.com/khbouft>*
>
> On Thu, Apr 12, 2018 at 7:11 AM, Robert Niestroj-Pahl <
> [hidden email]> wrote:
>
>> Hi there,
>>
>> I stumbled across a weird problem or maybe bug... I am using Fiji (latest
>> updated version) and MacOS High Sierra.
>>
>> I have a image with dots (RNAScope technique) to count.
>> I can easily threshold the image and use the particle analysis tool. All is
>> fine, count is 2300.
>>
>> But for my actual workflow, I first duplicate the image, use the median
>> filter Process>Filters>Median... and then subtract the median filtered
>> image
>> from the original image. This reduces background and S/N ratio.
>> Then I threshold the image, using auto thresholder and Triangle method.
>> Then I am using particle analysis tool again and the count is 1 ???? The
>> image itself looks normal and thresholded.
>>
>> I tried using manual thresholding and the particle counting worked
>> again....
>>
>> Bug???
>>
>>
>>
>>
>>
>> --
>> Sent from: http://imagej.1557.x6.nabble.com/
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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