I want to obtain the overlay from particle analysis and save it to file while executing the script in headless mode. From my understanding it is not possible to run ROI manager headlessly, so it is recommended to use the macro functions Overlay.copy and Overlay.paste instead, as stated in this thread: https://github.com/imagej/imagej-legacy/issues/153
I have been able to do this with ImageJ macro language, but when I try it with Python it does not work. From the Java API it seems that copy and paste are not methods of Overlay so I get an error :
“AttributeError: ‘ij.gui.Overlay’ object has no attribute ‘copy’”
Is there a way to solve this, either by using the macro functions or some other way?