Search code examples
javapluginsimagej

ImageJ classes used to analyze


I'm developing a ImageJ plugin that It works in my desktop pc but in my laptop it doesn't.

For this reason, now I'm trying to improve and I want to modify the next steps but i can't get it. This is the code:

IJ.selectWindow("example");     
IJ.run("Convert to Mask");
IJ.run("Fill Holes");
IJ.run("Set Scale...", "distance=1 known="+pixelSize+" pixel=1 unit=um");
IJ.run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Masks display clear record");

I known that "Analyze Particles" I must to use the ParticleAnalyzer class (I dont sure how to do but... I'm researching the class) but for the other steps I can not find solution.

I hope that someone can help, thank you. Best Regards.


Solution

  • I didn't get what I wanted it but I left to use the windows and now I am using ImagePus variables and It works better. I put the code:

    IJ.run(this.cMask, "Convert to Mask", "");
    IJ.run(this.cMask, "Fill Holes","");
    IJ.run(this.cMask, "Set Scale...", "distance=1 known="+pixelSize+" pixel=1 unit=um");
    IJ.run(this.cMask, "Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 display clear record");