Class BoundingBox

java.lang.Object
All Implemented Interfaces:
Algo, RegionAnalyzer<Box2D>

public class BoundingBox
extends RegionAnalyzer2D<Box2D>
Compute bounding box of each region within a label or binary image.
Author:
dlegland
  • Constructor Summary

    Constructors
    Constructor Description
    BoundingBox()
    Default constructor
  • Method Summary

    Modifier and Type Method Description
    Box2D[] analyzeRegions​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
    Computes bounding box of each region in input label image.
    static Box2D[] boundingBoxes​(ij.process.ImageProcessor labelImage, int[] labels, ij.measure.Calibration calib)
    Compute bounding box of each region in input image and returns the result as an array of Box2D for each label.
    ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​Box2D> map)
    Utility method that transforms the mapping between labels and bounding boxes instances into a ResultsTable that can be displayed with ImageJ.

    Methods inherited from class inra.ijpb.measure.region2d.RegionAnalyzer2D

    analyzeRegions, analyzeRegions, computeTable

    Methods inherited from class inra.ijpb.algo.AlgoStub

    addAlgoListener, removeAlgoListener

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BoundingBox

      public BoundingBox()
      Default constructor
  • Method Details

    • boundingBoxes

      public static final Box2D[] boundingBoxes​(ij.process.ImageProcessor labelImage, int[] labels, ij.measure.Calibration calib)
      Compute bounding box of each region in input image and returns the result as an array of Box2D for each label.
      Parameters:
      labelImage - the input image containing label of region
      labels - an array of unique labels in image
      calib - the calibration of the image
      Returns:
      an array containing the bounding boxes of each region
    • analyzeRegions

      public Box2D[] analyzeRegions​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
      Computes bounding box of each region in input label image.
      Specified by:
      analyzeRegions in class RegionAnalyzer2D<Box2D>
      Parameters:
      image - the input image containing label of particles
      labels - the array of labels within the image
      calib - the calibration of the image
      Returns:
      an array of Box2D representing the calibrated coordinates of the bounding box of each region
    • createTable

      public ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​Box2D> map)
      Utility method that transforms the mapping between labels and bounding boxes instances into a ResultsTable that can be displayed with ImageJ.
      Parameters:
      map - the mapping between labels and bounding Boxes
      Returns:
      a ResultsTable that can be displayed with ImageJ.