Login  Register

Re: Analyze Particles Issue?

Posted by vytas-2 on Jul 24, 2006; 12:02pm
URL: http://imagej.273.s1.nabble.com/Analyze-Particles-Issue-tp3702049p3702050.html

Try the 3D objects counter:
http://rsb.info.nih.gov/ij/plugins/track/objects.html
         It's a very useful and powerful tool for volumes (space or
time) with rich output. It counts each object only once (via centroids??).

At 09:00 AM 7/17/2006, you wrote:

>Hello,
>
>    I am having this problem with this macro I wrote. It works on
> stacks of images and the purpose is to track cells as they migrate
> through a gel through using the centroid. I am using the inbuilt
> Analyze particle function to get my centroids; however, for some
> reason it is not picking up all the thresholded objects, and seems
> to be only picking up ones near the edges of the image. I am using
> a minimum area defined by the user to limit the amount of cells
> shown. Also if anyone has any suggestions for how to get ImageJ to
> define an object as the same object in each slice (there are many
> cells in each picture which is a problem) though I am still stuck
> on trying to get this part to work correctly.
>
>
>
>
>Here is my code:
>
>function Analyze_Stack()
>{
>    selectWindow("Reconstructed");
>    run("Median...", "radius=1");
>    run("Set Scale...", "distance=1300 known=860 pixel=1
> unit=microns global");
>    run("Set Measurements...", "area centroid display redirect=None
> decimal=3");
>O=1;
>t=0;
>for(n=1;n<=nSlices;n++)
>{
>        setSlice(n);
>        O=1;
>        while(O!=2)
>        {
>        min_area=newArray(20);
>        if(t==0&&n==1)
>            fin_area=getNumber("Minimum Area?: ", 100);
>        else
>          if(n==1)
>            fin_area=getNumber("Minimum Area? (Previous was
> "+min_area[t-1]+"):", 100);
>
>        run("Analyze Particles...", "size="+fin_area+"-Infinity
> circularity=0.00-1.00 show=Outlines display include record");
>        t++;
>        min_area[t]=fin_area;
>        if(n==1)
>        {
>        O=getNumber("Redo Analysis? (1 for yes, 2 for no)", 1);
>        }
>        else
>        O=2;
>
>        if(O==1)
>            {
>            run("Close");
>            selectWindow("Reconstructed");
>            }
>        else
>            {
>            saveAs("Jpeg");
>            saveAs("Measurements");
>            }
>        }
>    }
>}
>
>

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.