Login  Register

Re: Marcos - passing on measures to varibles in the same macro

Posted by Carles Rentero-2 on Jun 23, 2010; 1:59pm
URL: http://imagej.273.s1.nabble.com/Marcos-passing-on-measures-to-varibles-in-the-same-macro-tp3687849p3687850.html

Hi Roger,
just a simple approach that could work: 'getHeight' and 'getWidth'  
will give you the height & width in pixels of the image. From here,  
1/2 of each of them will give you the center of image (use Round(n)  
for odd values).

Hope it helps!!
Carles.

--
Carles Rentero
Dept. de Biologia Cel·lular, Immunologia i Neurociències
Institut d'Investigacions Biomèdiques August Pi i Sunyer (IDIBAPS)
Facultat de Medicina - Hospital Clínic de Barcelona
Universitat de Barcelona (UB)

c/ Casanova, 143
08036 Barcelona
SPAIN

phone: +34 93 227 5400 ext. 3358
FAX: +34 93 402 1907


Roger_Kemp <[hidden email]> ha escrit:

> Hello,
>
> I would like to use the doWand command in a macro on the centre of an image,
> but I will not know the co-ords of the centre so I would like to run a
> measurement to find the centroid co-ordinates and pass the values on to a
> varible to use later on in the same macro.
>
> is this possible? and if so how?
>
> thanks in advance
>
> Roger
> --
> View this message in context:  
> http://imagej.588099.n2.nabble.com/Marcos-passing-on-measures-to-varibles-in-the-same-macro-tp5213176p5213176.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>