Juan Francisco a écrit :
> Dear all:
> I´m generating a macro with ImageJ (I use Record button: Plugins-->Macros--->Record...). One command on the macro gives the centroid (XY, YM) of a image. In the next commad I want to adds in the macro, I need this XY and YM as inputs for a ROI that I specify (Edit-->Selectio---->Specify) .
> Please, do anyone how to do this?
> 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>
>
Hi Juan,
A way to do that :
//Set center of mass as measurements
run("Set Measurements...", " centroid center redirect=None decimal=3");
//Measure
run("Measure");
//Get your variables with getResult(column, row)
myX=getResult("XM",0);
myY=getResult("YM",0);
print("XM= ",myX, "YM= ",myY);
//Clear the results for next measure
run("Clear Results");
hope it helps
--
Christophe CHAMOT
---------------------------------------------------------------------
Plate-Forme de Recherche UMR7592
"Imageries des Processus Dynamiques
en Biologie Cellulaire et Biologie du Développement "
Institut Jacques Monod, CNRS, Universités Paris 6 et 7
2, place Jussieu - Tour 43
75251 Paris cedex 05
Tel: 01 44 27 47 56
fax: 01 44 27 98 57
http://www.ijm.fr/---------------------------------------------------------------------