On centroid disply with ImageJ

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

On centroid disply with ImageJ

Juan Francisco-2
Dear all:
  pls, does anyone how its possible that ImageJ displays on the image the position on the "center of mass" measured after select this item on Aanlyse-->Set Measurements... and run the option Analyse----> Measure?. I can get the numerical postion of the center of mass, but I also need a graphic psoition on the image.
  THANK YOU VERY MUCH!!
  Juan Francisco
   

 
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: On centroid disply with ImageJ

Wayne Rasband
On Apr 9, 2007, at 6:21 AM, Juan Francisco wrote:

> Dear all:
>   pls, does anyone how its possible that ImageJ displays on the image
> the position on the "center of mass" measured after select this item
> on Aanlyse-->Set Measurements... and run the option Analyse---->
> Measure?. I can get the numerical postion of the center of mass, but I
> also need a graphic psoition on the image.
>   THANK YOU VERY MUCH!!
>   Juan Francisco

Here is a macro that displays a point selection at the center of mass:

     run("Select None");
     getPixelSize(unit, pixelWidth, pixelHeight);
     x=newArray(1); y=newArray(1);
     run("Measure");
     x[0] = getResult("XM")/pixelWidth;
     y[0] = getResult("YM")/pixelHeight;
     makeSelection("point", x,  y);

-wayne