Class AlgorithmUnionFindComponentLabelling

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmUnionFindComponentLabelling
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmUnionFindComponentLabelling extends AlgorithmBase
Author:
ilb 1.) The Watershed Transform: Definitions, Algorithms, and Parallelization Strategies by Jos B.T.M. Roerdink and Arnold Meijster, Fundamentals Informaticae 41 (2001), pp. 187-228. Algorithm 4.7 Scan-line algorithm for labelling level components based on disjoint sets. The UNION-FIND algorithm for implementing disjoint sets can be used for computing connected components, and therefore for minima detection as well. This algorithm can be used for the computation of connected components in images of any dimension, size, and connectivity. regional maxima Connected set of pixels of constant intensity from which it is impossible to reach a point with higher intensity without first descending; that is, a connected component of pixels with the same intensity value, t, surrounded by pixels that all have a value less than t. regional minima Connected set of pixels of constant intensity from which it is impossible to reach a point with lower intensity without first ascending; that is, a connected component of pixels with the same intensity value, t, surrounded by pixels that all have a value greater than t.
  • Field Details

    • numNeighbor

      private int numNeighbor
    • limitBins

      boolean limitBins
    • binNumber

      int binNumber
    • parentBuffer

      int[] parentBuffer
  • Constructor Details

    • AlgorithmUnionFindComponentLabelling

      public AlgorithmUnionFindComponentLabelling(ModelImage destImage, ModelImage srcImage, int numNeighbor, boolean limitBins, int binNumber)
  • Method Details

    • runAlgorithm

      public void runAlgorithm()
      Description copied from class: AlgorithmBase
      Actually runs the algorithm. Implemented by inheriting algorithms.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • run2D

      public void run2D()
    • run3D

      public void run3D()
    • findRoot

      private int findRoot(int p)
    • pathCompress

      private void pathCompress(int p, int r)