Login  Register

Re: slice information for individual points in ROI

Posted by Jerome Mutterer-3 on Jul 31, 2018; 9:08am
URL: http://imagej.273.s1.nabble.com/slice-information-for-individual-points-in-ROI-tp5021020p5021025.html

Hi Kenneth

next to Marcel's suggestion, you could also use:

roi.getZPosition();

see: https://github.com/imagej/imagej1/blob/master/ij/gui/Roi.java#L1748

Sincerely,

Jerome.



2018-07-31 9:51 GMT+02:00 Marcel. <[hidden email]>:

> Hello Kenneth,
>
> you can get the "Slice" column information from the ResultsTable. For the
> following example the stack and measurements must be available:
>
> import ij.IJ;
> import ij.measure.ResultsTable;
> import ij.plugin.PlugIn;
>
> public class MultiPointResults implements PlugIn {
>
>         public void run(String arg) {
>                 IJ.run("Measure");
>                 ResultsTable rt = ResultsTable.getResultsTable();
>                 for (int i = 0; i < rt.size(); i++) {
>                         System.out.println(rt.getValue("Slice", i));
>                 }
>                 ResultsTable.getResultsWindow().close(false);
>
>         }
> }
>
> The other values (your coordinates) can be extracted by the given tbale
> column name.
> In this example I close the Results Table dialog after the measurements!
>
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

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