List all pixel coordinates in a line selection in Python

This question has been raised several times in the old mailing list and a function seems to exist getSelectionCoordinates but it is only available for IJ macro language.

How can I get it inside Python ?

I looked for the javadoc and imagej source code but I found nothing…

I found the following :


Isn’t the old IJ1 API ? Is there is IJ2 alternative ?

The class to check is ij.macro.Functions. It has all the function implementations. In this case, the command is getCoordiantes(); the source can be seen here.

The ImageJ2 ROI API is not really developed yet. We had one, but it is going to change. So I suggest sticking to the ImageJ1 API for now.

Thank you Curtis.

Hope you will get a stable ImageJ2 ROI API soon !