Hello,
I am writing a java program using the ImageJ framework for image analysis.
In this program I would like to run the analyze particle command through the
ParticleAnalyzer.java class on an image but I am having issues setting the
correct options to meet my outputs:
Here are the options I would like:
- Show: Bare Outlines
- Include Holes
- Size: 0-Infinity
- Circulation: 0-1
Here is my code so far:
ParticleAnalyzer(ParticleAnalyzer.INCLUDE_HOLES+ParticleAnalyzer.SHOW_OUTLINES, 0, null, 0, Double.MAX_VALUE, 0, 1);
pa.analyze(img);
pa.getOutputImage().show();
img is a 8-bit binary image created through the
ImageProcessor.setThreshold().
The issue I have run into is there seems to be no way to get bare outlines
through the options constructor. When I analyzed the
ij.plugin.filter.ParticleAnalyzer source code, it seems that the flag exists
but is not implemented for some reason. What is the best option for me to
proceed?
I have found that the process/binary/fill holes and process/binary/outline
functions produce a similar result but I have had minimal success with
automating this as well.