Analysing particles inside ROIs

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

Analysing particles inside ROIs

Jacqueline Ross
Dear All,

 

I have a question about analyzing particles.

 

Using the latest update, I can create ROIs from particles (e.g. nuclei
outlines) and add them into the ROI Manager. I can then save these as an
RoiSet.

 

What I now want to do is apply that ROI set to another image and count
the number of small spots inside each of those individual ROIs.

 

I would like to be able to end up with data for each individual ROI.

 

I hope someone will be able to help me with this. Any advice is much
appreciated.

 

Kind regards,

 

Jacqui.

 

Jacqueline Ross
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland, NEW ZEALAND

Tel: 64 9 373 7599 Ext 87438
Fax: 64 9 373 7484

http://www.health.auckland.ac.nz/biru/
<http://www.health.auckland.ac.nz/biru/>  

 
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

Gabriel Landini
On Thursday 28 September 2006 00:29, Jacqui Ross wrote:
> Using the latest update, I can create ROIs from particles (e.g. nuclei
> outlines) and add them into the ROI Manager. I can then save these as an
> RoiSet.
> What I now want to do is apply that ROI set to another image and count
> the number of small spots inside each of those individual ROIs.

Doesn't the particle analyzer already restrict the analysis to inside the ROI?

G.
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

Jacqueline Ross
In reply to this post by Jacqueline Ross
Hi Gabriel,

It's true that the Particle Analyzer restricts the analysis to the ROIs
but it doesn't give me the data for each individual ROI.

Therefore, I can put the individual ROIs into the ROI Manager but then
have to go to Analyze - Analyze Particles.

This gives me data for each particle and only measures the particles
within the ROIs.

However, it does not give me particle results within each ROI, e.g. ROI
1 contains 2 particles, ROI 2 contains 5 particles, etc.

Cheers,

Jacqui.

Jacqueline Ross
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland, NEW ZEALAND

Tel: 64 9 373 7599 Ext 87438
Fax: 64 9 373 7484

http://www.health.auckland.ac.nz/biru/ 

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Gabriel Landini
Sent: 28 September 2006 21:20
To: [hidden email]
Subject: Re: Analysing particles inside ROIs

On Thursday 28 September 2006 00:29, Jacqui Ross wrote:
> Using the latest update, I can create ROIs from particles (e.g. nuclei
> outlines) and add them into the ROI Manager. I can then save these as
an
> RoiSet.
> What I now want to do is apply that ROI set to another image and count
> the number of small spots inside each of those individual ROIs.

Doesn't the particle analyzer already restrict the analysis to inside
the ROI?

G.
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

Gabriel Landini
On Friday 29 September 2006 03:45, Jacqui Ross wrote:
> It's true that the Particle Analyzer restricts the analysis to the ROIs
> but it doesn't give me the data for each individual ROI.
> Therefore, I can put the individual ROIs into the ROI Manager but then
> have to go to Analyze - Analyze Particles.
> This gives me data for each particle and only measures the particles
> within the ROIs.
> However, it does not give me particle results within each ROI, e.g. ROI
> 1 contains 2 particles, ROI 2 contains 5 particles, etc.

You will have to write a macro or a plugin to loop through your ROIs and do
the particle analysis for each ROI at a time. Since you know which ROI you
are currently analysing, you know how many particle it has inside.
I think your problem is that you want to see that in the results table? But
the particle analyzer does not work like that, I think.
You will have to program the macro to get the ROI name (or XStart YStart) and
the number of particles detected after running the particle analyzer in that
ROI (this is given by the nResults variable) so you can output the result to
a text file or a log window.

I hope it helps

G.
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

Nick Mortimer
In reply to this post by Jacqueline Ross
Hi,

Quick question dose Particle Analyzer now export particle ROIs to the
ROI manager? I wrote my own custom particle Analyzer to save the
outlines of each particle in XY text format. You can the step through
the file and Particle Analyze each outline again, is that the sort of
thing you mean?

Nick  

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Gabriel Landini
Sent: Friday, 29 September 2006 4:42 PM
To: [hidden email]
Subject: Re: Analysing particles inside ROIs

On Friday 29 September 2006 03:45, Jacqui Ross wrote:
> It's true that the Particle Analyzer restricts the analysis to the
ROIs
> but it doesn't give me the data for each individual ROI.
> Therefore, I can put the individual ROIs into the ROI Manager but then
> have to go to Analyze - Analyze Particles.
> This gives me data for each particle and only measures the particles
> within the ROIs.
> However, it does not give me particle results within each ROI, e.g.
ROI
> 1 contains 2 particles, ROI 2 contains 5 particles, etc.

You will have to write a macro or a plugin to loop through your ROIs and
do
the particle analysis for each ROI at a time. Since you know which ROI
you
are currently analysing, you know how many particle it has inside.
I think your problem is that you want to see that in the results table?
But
the particle analyzer does not work like that, I think.
You will have to program the macro to get the ROI name (or XStart
YStart) and
the number of particles detected after running the particle analyzer in
that
ROI (this is given by the nResults variable) so you can output the
result to
a text file or a log window.

I hope it helps

G.
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

vytas-2
>Date: Thu, 28 Sep 2006 17:20:24 -0500
>To: ImageJ Interest Group <[hidden email]>
>From: vytas <[hidden email]>
>Subject: Re: Analysing particles inside ROIs
>
>Hello Jacqui,
>         Here is a macro that performs individual particle
> measurements in ROI automatically defined in one image and applied
> one at a time to another. It draws and labels the ROI for quality
> control and data verification.  It was intended for a 2-channel
> image stack, but I trust you can modify this if needed.  It also
> uses calibration parameters for a specific system, and thresholds
> pertinent to a specific experiment. You can specify the required
> values in the "set measurements" lines
>         It is similar to one published: Y Kataoka, VP Bindokas, RC.
> Duggan, JS. Murley, DJ. Grdina. Flow cytometric analysis of
> phosphorylated histone H2AX following exposure to ionizing
> radiation in human microvascular cells. J Radiat Res (Tokyo). 2006
> Sep 6.   Perhaps other can benefit form it.
>
>______begin macro (cut) below this line______
>// This macro adds particle analyzer
>// outlines to the ROI Manager and uses those ROi to perform
>// within-object counts on other color channels
>// this counts green particles per nucleus defined by DAPI outlines
>//      macro asks for input STK file
>//   ROI are numbered and overlaid on fitc image for documentation
>//   then  save the  RESULTS window data 'save as' EXCEL works nicely
>//  BE SURE TO CLOSE ALL IMAGE WINDOWS BEFORE ReRUNNING
>//              modifed 'RoiManagerAddParticles.txt' macro; balance
>by Vytas Bindokas, Univ. of Chicago, May 2005
>
>//      this is for 2-image stack, FITC then dapi order, 12-bit
>requires("1.34k");
>open();
>//run("Set Scale...", "distance=1 known=.10729 pixel=1 unit=um
>");     //  this calibrates for 60x oil objective
>t=getTitle();
>t2= t +' ROI.tif';
>  setFont("SansSerif", 24);
>run("Out");                     //zoom out to make image appear
>smaller on screen; megapixel cases
>run("Convert Stack to Images");
>run("Brightness/Contrast...");
>run("Enhance Contrast", "saturated=0.5");
>    rename("dapi");
>run("Out");
>selectWindow('0001');
>run("Out");
>    rename("FITC");
>selectWindow("dapi");
>
>run("Subtract Background...", "rolling=40");    // flatten illumination
>run("Gaussian Blur...", "radius=8");            // prep for watershedding
>  run("Duplicate...", "title=dapicopy");
>selectWindow("dapi");
>setAutoThreshold();
>//      setThreshold(20, 255);
>run("Threshold", "thresholded remaining black");
>//run("Watershed");                                      //split
>apart touching nuclei
>
>         // trace nuclear edges and build ROI list; edge particles
> are excluded here
>run("Colors...", "foreground=black background=white selection=yellow");
>         selectWindow("dapi");
>run("Analyze Particles...", "minimum=3000
>maximum=15000  show=Nothing record exclude");
>o = nResults;
>for (i=0; i<o; i++) {
>     x = getResult('XStart', i);
>     y = getResult('YStart', i);
>     doWand(x,y);                        // this step does the
> tracing, next builds the ROI list
>     roiManager("add");
>}
>                         //switch to FITC staining for measurements
> within nuclear boundaries
>
>    selectWindow('FITC');
>run("Set Scale...", "distance=1 known=.10729 pixell=1 unit=um
>");     //  this calibrates for 60x oil objective
>run("Set Measurements...", "area mean limit display redirect=None decimal=2");
>n = roiManager("count");
>
>run("Colors...", "foreground=white background=black selection=yellow");
>   for (i=0; i<n; i++) {
>         if (i==1) {
>                 write(" " +t);                          //these
> steps generate the results text entries
>                 write("found " +n);
>         }
>      run("Set Measurements...", "area mean centroid limit display
> redirect=None decimal=2");
>      setThreshold(1180, 4095);                  // set FITC
> threshold as needed here
>      roiManager("select", i);
>      write("foci for nucleus "+i);
>       run("Analyze Particles...", "minimum=2 maximum=999999
> show=Nothing display ");
>
>    run("Colors...", "foreground=white background=black selection=yellow");
>    write("FITC intensity for nucleus: " +i);
>    resetThreshold();
>    run("Set Measurements...", "area mean centroid display
> redirect=None decimal=2");  //this turns off threshold requirement
> to measure total signal
>         run("Measure");
>         x = getResult('X');
>         y = getResult('Y');
>         L = toString(i);
>     getVoxelSize(width, height, depth, unit);   //convert locale
> back to pixels
>     drawString(L, x/width, y/height);   //draw ROI label
>     roiManager("draw");         // draw outline
>     roiManager("deselect");
>   }
>resetThreshold();
>selectWindow("ROI Manager");
>run("Close");
>selectWindow("dapi");
>run("Close");
>run("RGB Merge...", "red=*None* green=FITC blue=dapicopy");
>    rename(t2);
>selectWindow("Results");
>
>
>________end of macro (cut above this line)_______________
At 10:18 PM 10/2/2006, you wrote:

>Hi,
>
>Quick question dose Particle Analyzer now export particle ROIs to the
>ROI manager? I wrote my own custom particle Analyzer to save the
>outlines of each particle in XY text format. You can the step through
>the file and Particle Analyze each outline again, is that the sort of
>thing you mean?
>
>Nick
>
>-----Original Message-----
>From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>Gabriel Landini
>Sent: Friday, 29 September 2006 4:42 PM
>To: [hidden email]
>Subject: Re: Analysing particles inside ROIs
>
>On Friday 29 September 2006 03:45, Jacqui Ross wrote:
> > It's true that the Particle Analyzer restricts the analysis to the
>ROIs
> > but it doesn't give me the data for each individual ROI.
> > Therefore, I can put the individual ROIs into the ROI Manager but then
> > have to go to Analyze - Analyze Particles.
> > This gives me data for each particle and only measures the particles
> > within the ROIs.
> > However, it does not give me particle results within each ROI, e.g.
>ROI
> > 1 contains 2 particles, ROI 2 contains 5 particles, etc.
>
>You will have to write a macro or a plugin to loop through your ROIs and
>do
>the particle analysis for each ROI at a time. Since you know which ROI
>you
>are currently analysing, you know how many particle it has inside.
>I think your problem is that you want to see that in the results table?
>But
>the particle analyzer does not work like that, I think.
>You will have to program the macro to get the ROI name (or XStart
>YStart) and
>the number of particles detected after running the particle analyzer in
>that
>ROI (this is given by the nResults variable) so you can output the
>result to
>a text file or a log window.
>
>I hope it helps
>
>G.

Vytas Bindokas, Ph.D.
Research Assoc. / Assoc. Prof.,
Director, BSD Light Microscopy Core Facility
Dept Neurobiol Pharmacol Physiol MC0926
947 E 58th Street
The University of Chicago
Chicago IL 60637
Room 1007 (CLSC)

773-702-4875

email [hidden email]
  web site for LMCF:
http://digital.bsd.uchicago.edu/index.html 



This email is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged and confidential.  If the reader of this email message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited.  If you have received this email in error, please notify the sender and destroy/delete all copies of the transmittal.  Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

Wayne Rasband
In reply to this post by Nick Mortimer
> Quick question dose Particle Analyzer now export particle ROIs
> to the ROI manager? I wrote my own custom particle Analyzer
> to save the outlines of each particle in XY text format. You can
> the step through the file and Particle Analyze each outline again,
> is that the sort of thing you mean?

The ROI Manager in ImageJ 1.37q adds an "Add Particles" command for
importing ROIs generated by the Particle Analyzer. The Particle
Analyzer in ImageJ 1.37u will have an "Add to Manager" option for
exporting the ROIs to the ROI Manager.

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

Re: Analysing particles inside ROIs

Gabriel Landini
On Tuesday 03 October 2006 16:05, Wayne Rasband wrote:
> The ROI Manager in ImageJ 1.37q adds an "Add Particles" command for
> importing ROIs generated by the Particle Analyzer. The Particle
> Analyzer in ImageJ 1.37u will have an "Add to Manager" option for
> exporting the ROIs to the ROI Manager.

Wayne,
Now that this came up, wouldn't the ROI Manager menu entry be better located
together with the other ROI functions (Edit>Selection)?

Regards

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: Analysing particles inside ROIs

Wayne Rasband
In reply to this post by Jacqueline Ross
On Oct 3, 2006, at 11:52 AM, Wayne Rasband wrote:

> On Tuesday 03 October 2006 16:05, Wayne Rasband wrote:
> > The ROI Manager in ImageJ 1.37q adds an "Add Particles"
> > command for importing ROIs generated by the Particle
> > Analyzer. The Particle Analyzer in ImageJ 1.37u will have an
> > "Add to Manager" option for exporting the ROIs to the ROI Manager.
>
> Wayne,
> Now that this came up, wouldn't the ROI Manager menu entry be
> better located together with the other ROI functions (Edit>Selection)?

It's not obvious, but the Edit>Selection>Add to Manager command (added
in 1.37q) opens the ROI Manager if it is not already open. And since
this command has a keyboard shortcut, you can open the ROI Manager by
pressing "t".

-wayne