Class OrientedBoundingBox2D

java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.measure.region2d.RegionAnalyzer2D<OrientedBox2D>
inra.ijpb.measure.region2d.OrientedBoundingBox2D
All Implemented Interfaces:
Algo, RegionAnalyzer<OrientedBox2D>

public class OrientedBoundingBox2D
extends RegionAnalyzer2D<OrientedBox2D>
Author:
dlegland
  • Constructor Summary

    Constructors
    Constructor Description
    OrientedBoundingBox2D()
    Default constructor.
  • Method Summary

    Modifier and Type Method Description
    OrientedBox2D[] analyzeRegions​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
    Computes an instance of the generic type T for each region in input label image.
    ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​OrientedBox2D> results)
    Utility method that converts the detailed results of the RegionAnalyzer.analyzeRegions(ImagePlus) method into an instance of ResultsTable to facilitate display by ImageJ.
    static OrientedBox2D orientedBoundingBox​(java.util.ArrayList<? extends java.awt.geom.Point2D> points)
    Computes the object-oriented bounding box of a set of points.
    static OrientedBox2D orientedBoundingBox​(java.util.ArrayList<? extends java.awt.geom.Point2D> points, ij.measure.Calibration calib)
    Computes the object-oriented bounding box of a set of points, computing convex hull in pixel coordinates.

    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

    • OrientedBoundingBox2D

      public OrientedBoundingBox2D()
      Default constructor.
  • Method Details

    • orientedBoundingBox

      public static final OrientedBox2D orientedBoundingBox​(java.util.ArrayList<? extends java.awt.geom.Point2D> points)
      Computes the object-oriented bounding box of a set of points.
      Parameters:
      points - a list of points (not necessarily ordered)
      Returns:
      the oriented box of this set of points.
    • orientedBoundingBox

      public static final OrientedBox2D orientedBoundingBox​(java.util.ArrayList<? extends java.awt.geom.Point2D> points, ij.measure.Calibration calib)
      Computes the object-oriented bounding box of a set of points, computing convex hull in pixel coordinates. Due to numerical computation, this versions is usually more stable than computing the convex hull on the calibrated points.
      Parameters:
      points - a list of points, in pixel coordinates
      calib - the spatial calibration of the points
      Returns:
      the oriented box of this set of points, in calibrated coordinates
    • createTable

      public ij.measure.ResultsTable createTable​(java.util.Map<java.lang.Integer,​OrientedBox2D> results)
      Description copied from interface: RegionAnalyzer
      Utility method that converts the detailed results of the RegionAnalyzer.analyzeRegions(ImagePlus) method into an instance of ResultsTable to facilitate display by ImageJ.
      Parameters:
      results - the mapping between each region label and the result of the analysis
      Returns:
      an instance of ResultsTable containing results presented in a tabular format.
    • analyzeRegions

      public OrientedBox2D[] analyzeRegions​(ij.process.ImageProcessor image, int[] labels, ij.measure.Calibration calib)
      Description copied from class: RegionAnalyzer2D
      Computes an instance of the generic type T for each region in input label image.
      Specified by:
      analyzeRegions in class RegionAnalyzer2D<OrientedBox2D>
      Parameters:
      image - the input image containing label of particles
      labels - the array of labels within the image
      calib - the spatial calibration of the image
      Returns:
      an array of the type used to represent the analysis result of each region