Login  Register

Re: how to get multi-point Z coordinates

Posted by CARL Philippe (LBP) on Oct 20, 2019; 10:35am
URL: http://imagej.273.s1.nabble.com/how-to-get-multi-point-Z-coordinates-tp5022551p5022553.html

Dear Wayne,
How are you doing?
Don't you rather want to call this new macro method: Roi.getStackPosition(i)
or something similar which would make it a little bit more self explaining?
I guess this the macro method corresponding to the ij.gui.Roi.java getPosition() method, or am I wrong?
Have a nice week-end.
Kindest regards,
Philippe

----- Mail original -----
De: "Wayne Rasband" <[hidden email]>
À: "imagej" <[hidden email]>
Envoyé: Dimanche 20 Octobre 2019 07:25:09
Objet: Re: how to get multi-point Z coordinates

> 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

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