Login  Register

Re: how to get multi-point Z coordinates

Posted by Wayne Rasband-2 on Oct 20, 2019; 5:25am
URL: http://imagej.273.s1.nabble.com/how-to-get-multi-point-Z-coordinates-tp5022551p5022552.html

> On Oct 18, 2019, at 5:04 AM, Leroy Olivier <[hidden email]> wrote:
>
> Hello,
>
> I have a Z stack with a multi-point selection.
> Points are in different slices.
> To get X and Y coordinates of all points is easy with getSelectionCoordinates(x, y) macro function.
> But I don't know how to get the Z coordinates.
> Any idea ?

The latest ImageJ daily build (1.52r48) adds the Roi.getPointPosition(index) macro function, which returns the stack position of the point with the specified index. Here is an example:

   for (i=0; i<Roi.size; i++)
      print(i+" "+Roi.getPointPosition(i));

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html