Discussion:
plugin/macro to automatically find and measure peak width
John Oreopoulos
2014-05-01 12:16:24 UTC
Permalink
Hello, I'm writing this email on behalf of a colleague who is not part of the ImageJ email listserver. This person is wondering if there is an existing macro or plugin that can automatically find and measure the widths of peaks in an image of point-sources of light. For example, his images might look like this one:

Loading Image...

The macro/plugin would ideally find each source of light (in this case a pinhole in a Nipkow disk), fit a Gaussian distribution to this point-source along x and y line profiles drawn through the point, then extract the standard deviation / FWHM of both fits, and finally log the results into a text file.

So far I've been able to construct a simple macro that finds the pinholes using the analyze particles function (searching for centroids) and limiting to a threshold, and then using the xy coordinates of the centroids to act as positions for drawing line profiles through. I think the next step would be to use ImageJ's curve-fitting algorithm to get the fitting data.

Again, not want to re-invent the wheel here, so just wanted to check if there's something out there that can already do this. Would the MetroloJ plugin work in this situation, or does that only work with single points of light in an image (like a fluorescent bead in a micrograph)? My colleague would also ideally have the ability to do this calculation rapidly on the fly as the image is acquired (with maybe a few seconds delay maximum). Maybe MicroManager could do this through it's scripting functions?

Any help here is much appreciated!


Sincerely,


John Oreopoulos
Staff Scientist
Spectral Applied Research Inc.
A Division of Andor Technology
Richmond Hill, Ontario
Canada
www.spectral.ca



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Herbie
2014-05-01 14:24:15 UTC
Permalink
John,

finding the maxima is really easy using the menu command "Find
maxima..." which works reliably with the provided image and a proper
tolerance. This operation provides the point selections and you may get
the coordinates simply by e.g. using the menu command "Measure". No big
deal...

Fitting a Gaussian is a different matter. I guess a 2D-Gaussian is
desired and as far as I know there is no standard IJ-command for this,
but maybe you will find a plugin at the IJ-Website. Did you try?

Best

Herbie
Post by John Oreopoulos
Hello, I'm writing this email on behalf of a colleague who is not
part of the ImageJ email listserver. This person is wondering if
there is an existing macro or plugin that can automatically find and
measure the widths of peaks in an image of point-sources of light.
http://fiji.sc/images/2/26/Disc60xwithoutoptovar.gif
The macro/plugin would ideally find each source of light (in this
case a pinhole in a Nipkow disk), fit a Gaussian distribution to this
point-source along x and y line profiles drawn through the point,
then extract the standard deviation / FWHM of both fits, and finally
log the results into a text file.
So far I've been able to construct a simple macro that finds the
pinholes using the analyze particles function (searching for
centroids) and limiting to a threshold, and then using the xy
coordinates of the centroids to act as positions for drawing line
profiles through. I think the next step would be to use ImageJ's
curve-fitting algorithm to get the fitting data.
Again, not want to re-invent the wheel here, so just wanted to check
if there's something out there that can already do this. Would the
MetroloJ plugin work in this situation, or does that only work with
single points of light in an image (like a fluorescent bead in a
micrograph)? My colleague would also ideally have the ability to do
this calculation rapidly on the fly as the image is acquired (with
maybe a few seconds delay maximum). Maybe MicroManager could do this
through it's scripting functions?
Any help here is much appreciated!
Sincerely,
John Oreopoulos Staff Scientist Spectral Applied Research Inc. A
Division of Andor Technology Richmond Hill, Ontario Canada
www.spectral.ca
-- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Unruh, Jay
2014-05-01 15:54:47 UTC
Permalink
My Fiji update site (the stowers site) has a plugin called fit roi gaussian jru v1 which fits a spot in a square roi to a 2D gaussian. Of course, you will need to convert your maxima to square roi's first. Note that I'm in the process of updating the plugin to output to a table but that may take a while. You can download directly from my website here:

http://research.stowers.org/imagejplugins/

Jay

-----Original Message-----
From: ImageJ Interest Group [mailto:IMAGEJ-9srhZJH3/***@public.gmane.org] On Behalf Of Herbie
Sent: Thursday, May 01, 2014 9:24 AM
To: IMAGEJ-9srhZJH3/***@public.gmane.org
Subject: Re: plugin/macro to automatically find and measure peak width

John,

finding the maxima is really easy using the menu command "Find maxima..." which works reliably with the provided image and a proper tolerance. This operation provides the point selections and you may get the coordinates simply by e.g. using the menu command "Measure". No big deal...

Fitting a Gaussian is a different matter. I guess a 2D-Gaussian is desired and as far as I know there is no standard IJ-command for this, but maybe you will find a plugin at the IJ-Website. Did you try?

Best

Herbie
Post by John Oreopoulos
Hello, I'm writing this email on behalf of a colleague who is not part
of the ImageJ email listserver. This person is wondering if there is
an existing macro or plugin that can automatically find and measure
the widths of peaks in an image of point-sources of light.
http://fiji.sc/images/2/26/Disc60xwithoutoptovar.gif
The macro/plugin would ideally find each source of light (in this case
a pinhole in a Nipkow disk), fit a Gaussian distribution to this
point-source along x and y line profiles drawn through the point, then
extract the standard deviation / FWHM of both fits, and finally log
the results into a text file.
So far I've been able to construct a simple macro that finds the
pinholes using the analyze particles function (searching for
centroids) and limiting to a threshold, and then using the xy
coordinates of the centroids to act as positions for drawing line
profiles through. I think the next step would be to use ImageJ's
curve-fitting algorithm to get the fitting data.
Again, not want to re-invent the wheel here, so just wanted to check
if there's something out there that can already do this. Would the
MetroloJ plugin work in this situation, or does that only work with
single points of light in an image (like a fluorescent bead in a
micrograph)? My colleague would also ideally have the ability to do
this calculation rapidly on the fly as the image is acquired (with
maybe a few seconds delay maximum). Maybe MicroManager could do this
through it's scripting functions?
Any help here is much appreciated!
Sincerely,
John Oreopoulos Staff Scientist Spectral Applied Research Inc. A
Division of Andor Technology Richmond Hill, Ontario Canada
www.spectral.ca
-- 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
George Patterson
2014-05-01 18:57:11 UTC
Permalink
Hi John,
I've not used it, but here's a link to a plugin which might help.
Best,
George

http://rsb.info.nih.gov/ij/plugins/fwhm/index.html
Post by John Oreopoulos
Hello, I'm writing this email on behalf of a colleague who is not part of
the ImageJ email listserver. This person is wondering if there is an
existing macro or plugin that can automatically find and measure the widths
of peaks in an image of point-sources of light. For example, his images
http://fiji.sc/images/2/26/Disc60xwithoutoptovar.gif
The macro/plugin would ideally find each source of light (in this case a
pinhole in a Nipkow disk), fit a Gaussian distribution to this point-source
along x and y line profiles drawn through the point, then extract the
standard deviation / FWHM of both fits, and finally log the results into a
text file.
So far I've been able to construct a simple macro that finds the pinholes
using the analyze particles function (searching for centroids) and limiting
to a threshold, and then using the xy coordinates of the centroids to act
as positions for drawing line profiles through. I think the next step would
be to use ImageJ's curve-fitting algorithm to get the fitting data.
Again, not want to re-invent the wheel here, so just wanted to check if
there's something out there that can already do this. Would the MetroloJ
plugin work in this situation, or does that only work with single points of
light in an image (like a fluorescent bead in a micrograph)? My colleague
would also ideally have the ability to do this calculation rapidly on the
fly as the image is acquired (with maybe a few seconds delay maximum).
Maybe MicroManager could do this through it's scripting functions?
Any help here is much appreciated!
Sincerely,
John Oreopoulos
Staff Scientist
Spectral Applied Research Inc.
A Division of Andor Technology
Richmond Hill, Ontario
Canada
www.spectral.ca
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Loading...