Class AlgorithmEfficientWatershed

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

public class AlgorithmEfficientWatershed extends AlgorithmBase
Author:
ilb Reference: * 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.1 Vincent-Soille watershed algorithm 2.) Image Processing, Analysis, and Machine Vision 4th edition International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Section 6.3.4 Watershed segmentation, pp. 229-232. 3.) Watersheds in Digital Spaces: An Efficient Algorithm Based on Immersion Simulations by Luc Vincent and Pierre Soille, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 13, No. 6, June, 1991, pp. 583-598. 4.) Fast watershed algorithms: analysis and extensions by Bogdan P. Dobrin, Timo Viero, and Moncef Gabbouj. 5.) Watershed-Based Segmentation of 3D MR Data for Volume Quantization by J. Sijbers, P. Scheunders, M. Verhoye, A. Van Der Linden, D. van Dyck, and E. Raman, Magnetic Resonance Imaging, Vol. 15, No. 6, 1997, pp. 679-688. 6.) Automated Sulcal Segmentation Using Watersheds on the Cortical Surface by Maryam E. Rettmann, Xiao Han, Chenyang Xu, and Jerry L. Prince, NeuroImage 15, 2002, Section Merging of Catchment Basins, p.338. The ImageJ version has 3 differences with the original article pseudocode as noted in comments. Reference 2 states "Further improvements of the watershed segmentation based on immersion simulations are given in [Dobrin et al., 1994]." Reference 4 states: "Vincent invalid input: '&' Soille algorithm produces a tesselation of the image into its disjoint catchment basins. Pixels lying exactly half-way between the two catchment basins, should be assigned to watersheds. Studying the operation of Vincent and Soille algorithms, we will show that this is not always the case. The algorithm has a tendency to generate large watershed regions, because it does not propagate only catchment basin labels but also watershed labels.... Therefore, the algorithm produces an ambiguous result when propagating watershed lines to a region. Another drawback of this algorithm is given by the oscillation in the pixel assignment rule. It is relatively easy to see ... that the value of the current pixel, i.e. the pixel whose value is to be determined, can change multiple times depending on its local neighborhood. For example, the current pixel can firstly be assigned to watersheds and then immediately to a catchment basin label or vice versa. As a result, the operation of the algorithm is inconsistent in several critical pixel configurations." Reference 5 uses a 3D version of this algorithm with 26 connectivity.
  • Field Details

    • MASK

      private static final int MASK
      See Also:
    • WSHED

      private static final int WSHED
      See Also:
    • INIT

      private static final int INIT
      See Also:
    • numNeighbor

      private int numNeighbor
    • limitBins

      private boolean limitBins
    • binNumber

      private int binNumber
    • merge

      private boolean merge
    • mergeThreshold

      private double mergeThreshold
  • Constructor Details

    • AlgorithmEfficientWatershed

      public AlgorithmEfficientWatershed(ModelImage destImage, ModelImage srcImage, int numNeighbor, boolean limitBins, int binNumber, boolean merge, double mergeThreshold)
  • 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()