.. java:import:: ch.epfl.leb.defcon.predictors Predictor .. java:import:: ch.epfl.leb.defcon.predictors.internal DefaultPredictor .. java:import:: ch.epfl.leb.defcon.predictors SessionClosedException .. java:import:: ch.epfl.leb.defcon.predictors ImageBitDepthException .. java:import:: ch.epfl.leb.defcon.predictors UninitializedPredictorException .. java:import:: ij IJ .. java:import:: ij ImagePlus .. java:import:: ij.gui Roi .. java:import:: ij.measure ResultsTable .. java:import:: ij.plugin.filter PlugInFilter .. java:import:: ij.process ImageProcessor .. java:import:: ij WindowManager .. java:import:: ij ImageStack DensityCount ============ .. java:package:: ch.epfl.leb.defcon.ij :noindex: .. java:type:: public class DensityCount implements PlugInFilter Computes a density map estimate for counting objects within an image. :author: Baptiste Ottino Methods ------- run ^^^ .. java:method:: public void run(ImageProcessor ip) :outertype: DensityCount Computes a density map from the selected image stack. A results table that indicates the count is displayed in addition to the density map image. :param ip: The input image processor. setup ^^^^^ .. java:method:: public int setup(String pathToModel, ImagePlus imp) :outertype: DensityCount Sets up the PlugInFilter. :param pathToModel: The path to a saved TensorFlow model bundle. :param imp: The currently active image. :return: A flag indicating which types of images this plugin handles. **See also:** \ `PlugInFilter `_\