import ij.*; import ij.text.*; import ij.process.*; import ij.gui.*; import java.awt.*; import ij.plugin.*; import ij.plugin.filter.*; public class Hemozoin_Analysis implements PlugIn { public void run(String arg) { ImagePlus image = IJ.getImage(); IJ.run("Subtract Background...", "rolling=50 light"); IJ.run("Split Channels", ""); IJ.run("Threshold..."); IJ.setThreshold(0, 170); IJ.run("Convert to Mask", ""); IJ.run("Close"); IJ.run("Create Selection", ""); IJ.run("Measure", ""); IJ.run("Close"); IJ.run("Threshold..."); IJ.setThreshold(0, 130); IJ.run("Convert to Mask", ""); IJ.run("Close"); IJ.run("Create Selection", ""); IJ.run("Measure", ""); WindowManager.putBehind(); IJ.run("Close"); IJ.run("Close"); } }