Login  Register

Re: Marking Cell Centroids in a Stack

Posted by Michael Schmid on May 12, 2009; 4:43pm
URL: http://imagej.273.s1.nabble.com/Marking-Cell-Centroids-in-a-Stack-tp3692560p3692561.html

Hi Tony,

what do you think of, when you say "mark the centroids"? Draw a dot  
there?

If you have a stack, you could write a simple macro that runs  
"Analyze Particles" and has a loop over the particles with setPixel
(x,y) for each slice. See the nResults and getResult("Column", row)  
macro commands.

If you have binary images, e.g. created by thresholding, the "Find  
Maxima" function can create a point selection that marks the point  
closest to the centroid of each particle (in contrast to the  
centroid, this point never lies outside the particle bounds, even in  
case of a slim crescent shape). You can transfer the point selection  
to the original image by "Restore Selection" and use "Draw" to paint  
the points in the foreground color.

For getting ideas how to do this in a stack, see, e.g., the  
findStackMaxima macro
   http://rsbweb.nih.gov/ij/macros/FindStackMaxima.txt
In your case, you will have to jump between the binary image and the  
original, see the getImageID() and selectImage(id) macro functions.

I am not aware of a solution without a little bit of macro programming.

Hope this helps,

Michael
________________________________________________________________

On 12 May 2009, at 18:08, Anthony Kowal wrote:

> Hi Everyone,
>
> I am a novice at using ImageJ, and I have tried to find this answer  
> out but
> with no success.  I have taken a time lapse recording of cells  
> chemotaxing
> towards folate, and am interested in not only finding the centroid  
> of the
> cell, but also marking it in order to help with downstream  
> analysis.  Can
> anyone please point me in the right direction on how to do this?
>
> Thanks,
>
> Tony