Hide ROI Manager Window
Posted by Rafael Ballester on
URL: http://imagej.273.s1.nabble.com/Hide-ROI-Manager-Window-tp3682446.html
Hi everybody,
I have generated a binary image consisting of segmented particles. With ImageJ's API, I would like to obtain its particles as ROIs, so as to analyze them later. What is the easiest way to obtain those ROIs?
The following way works using the ParticleAnalyzer class to store the detected ROIs into the RoiManager, so that I can retrieve them later. But I can't prevent this approach from opening the ROI Manager Window, which is annoying in an automatised context.
int options = ParticleAnalyzer.ADD_TO_MANAGER;
ParticleAnalyzer pa = new ParticleAnalyzer(options, 0, new ResultsTable(), 0, Double.MAX_VALUE, 0, 1);
pa.analyze(imSegmented); // imSegmented is my binary image
RoiManager manager = RoiManager.getInstance();
Roi[] rois = manager.getRoisAsArray();
Do you know how to prevent that window from appearing? Or any different way to obtain the ROIs?
Thanks in advance!