Quantcast

Histogram of Analyze Particles Results

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Histogram of Analyze Particles Results

JOEL B. SHEFFIELD
Dear Group,

I know that the Analyze Particles section of ImageJ allows one to
generate a histogram of the size distribution of the particles.  Is
there a plugin that would allow one to generate a histogram of other
results values, such as integrated density?

The only histograms I see on the plugins list relate to pixel
distributions.

Thanks,

Joel

Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Histogram of Analyze Particles Results

Wayne Rasband
> Dear Group,
>
> I know that the Analyze Particles section of ImageJ allows
> one to  generate a histogram of the size distribution of
> the particles.  Is there a plugin that would allow one to
> generate a histogram of other results values, such as integrated
> density?
>
> The only histograms I see on the plugins list relate
> to pixel distributions.

Here is a macro that does this. This macro is also available at

   http://rsb.info.nih.gov/ij/macros/HistogramOfResultsValues.txt

-wayne

   requires("1.34m");
   nBins = 20;
   n = nResults;
   if (n==0)
       exit("Results table is empty");
   values = newArray("Area", "Mean", "StdDev", "Mode", "Min",
     "Max", "Perim.", "Circ.", "IntDen", "Median","Skew","Kurt" );
   Dialog.create("Histrogram");
   Dialog.addChoice("Value:", values);
   Dialog.addNumber("Number of Bins:", nBins);
   Dialog.show();
   value = Dialog.getChoice();
   nBins = Dialog.getNumber();
   //setBatchMode(true); // works in 1.35a or later
   newImage(value, "32-bit", n, 1, 1);
   for (i=0; i<n; i++) {
       v = getResult(value, i);
       if (i==0 && isNaN(v)) {
           close();
           exit("\""+value+"\" not in results table");
       }
       setPixel(i, 0, v);
   }
   run("Histogram", "bins="+nBins+" use y_max=Auto");
   id = getImageID;
   selectImage(value);
   close();
   selectImage(id);
   setBatchMode(false);
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Histogram of Analyze Particles Results

JOEL B. SHEFFIELD
Thanks, Wayne.  It's just what I need.

Date sent:       Sun, 17 Jul 2005 22:57:40 -0400
Send reply to:   ImageJ Interest Group <[hidden email]>
From:           Wayne Rasband <[hidden email]>
Subject:         Re: Histogram of Analyze Particles Results
To:             [hidden email]

> > Dear Group,
> >
> > I know that the Analyze Particles section of ImageJ allows
> > one to  generate a histogram of the size distribution of
> > the particles.  Is there a plugin that would allow one to
> > generate a histogram of other results values, such as integrated
> > density?
> >
> > The only histograms I see on the plugins list relate
> > to pixel distributions.
>
> Here is a macro that does this. This macro is also available at
>
>    http://rsb.info.nih.gov/ij/macros/HistogramOfResultsValues.txt
>
> -wayne
>
>    requires("1.34m");
>    nBins = 20;
>    n = nResults;
>    if (n==0)
>        exit("Results table is empty");
>    values = newArray("Area", "Mean", "StdDev", "Mode", "Min",
>      "Max", "Perim.", "Circ.", "IntDen", "Median","Skew","Kurt" );
>    Dialog.create("Histrogram");
>    Dialog.addChoice("Value:", values);
>    Dialog.addNumber("Number of Bins:", nBins);
>    Dialog.show();
>    value = Dialog.getChoice();
>    nBins = Dialog.getNumber();
>    //setBatchMode(true); // works in 1.35a or later
>    newImage(value, "32-bit", n, 1, 1);
>    for (i=0; i<n; i++) {
>        v = getResult(value, i);
>        if (i==0 && isNaN(v)) {
>            close();
>            exit("\""+value+"\" not in results table");
>        }
>        setPixel(i, 0, v);
>    }
>    run("Histogram", "bins="+nBins+" use y_max=Auto");
>    id = getImageID;
>    selectImage(value);
>    close();
>    selectImage(id);
>    setBatchMode(false);
>

Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Histogram of Analyze Particles Results

Gabriel Landini
In reply to this post by Wayne Rasband
On Monday 18 July 2005 03:57, Wayne Rasband wrote:
> Here is a macro that does this. This macro is also available at
>
>    http://rsb.info.nih.gov/ij/macros/HistogramOfResultsValues.txt

I wrote a similar plugin (Results_Histogram), that in addition, can histogram
the results of other Result Tables (such as the ones generated with
Particles4, Particles8 and Particles8_plus).
Just remember that not everything shown in the Results window is necessarily
included in the Results Table.

The file is here:
http://www.dentistry.bham.ac.uk/landinig/software/software.html

Cheers,

Gabriel
Loading...