Class AlgorithmPowerWatershed

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

public class AlgorithmPowerWatershed extends AlgorithmBase
This is a port of C code written by Camille Couprie in 2009. Camille Couprie has kindly granted the NIH MIPAV project permission to port her Power watershed code from C to Java under a BSD license. Porting performed by William Gandler. This "powerwatershed" package provides implementation of several segmentation algorithms on 2D or 3D images. The 3 algorithms are: 1.) Maximum Spanning Forest computed by Kruskal algorithm. 2.) Powerwatersheds (p=infinite, q= 2) : Maximum Spanning Forest computed by Kruskal algorithm and Random walker on plateaus. 3.) Maximum Spanning Forest computed by Prim algorithm using red and black trees. Reference: "Power watersheds: A new image segmentation framework extending graph cuts, random walker and optimal spanning forest" by Camille Couprie, Leo Grady, Laurent Najman, and Hugues Talbot, ICCV'09, 2009,
  • Field Details

    • Kruskal

      private static int Kruskal
    • PW_qis2

      private static int PW_qis2
    • Prim

      private static int Prim
    • RBT_Black

      private static byte RBT_Black
    • RBT_Red

      private static byte RBT_Red
    • epsilon

      private double epsilon
    • SIZE_MAX_PLATEAU

      private int SIZE_MAX_PLATEAU
    • testRbtInteractive

      private boolean testRbtInteractive
    • testRbtRandom

      private boolean testRbtRandom
    • testIndic

      private boolean testIndic
    • testLifo

      private boolean testLifo
    • algo

      private int algo
    • index_seeds

      private Vector<Integer> index_seeds
    • index_labels

      private Vector<Short> index_labels
    • geod

      private boolean geod
    • produceProbaImage

      private boolean produceProbaImage
    • error

      private boolean error
    • MAX

      private int MAX
    • Indics

      private short[] Indics
    • randomGen

      RandomNumberGen randomGen
  • Constructor Details

    • AlgorithmPowerWatershed

      public AlgorithmPowerWatershed(ModelImage destImg, ModelImage srcImg, int algo, Vector<Integer> index_seeds, Vector<Short> index_labels, boolean geod)
      Constructs Power watershed algorithm.
      Parameters:
      destImg - Image model where result image is to stored
      srcImg - Source image model
      algo - Kruskal, or Prim
      index_seeds - The index in the image array of the seed
      index_labels - For 2-labels 1 for white foreground and 2 for black background For multi-labels values from 1 to n with n invalid input: '<'= 255 for segmentation in n labels
      geod - Geodesic reconstruction
  • Method Details