java.lang.Object
org.hortonmachine.lesto.modules.vegetation.watershed.WatershedPixel
All Implemented Interfaces:
Comparable<WatershedPixel>

public class WatershedPixel extends Object implements Comparable<WatershedPixel>
The aim of WatershedPixel is to enable sorting the pixels of an Image according to their grayscale value. This is the first step of the Vincent and Soille Watershed algorithm (1991)
  • Constructor Details

    • WatershedPixel

      public WatershedPixel(int x, int y, byte height)
    • WatershedPixel

      public WatershedPixel()
  • Method Details

    • addNeighbour

      public void addNeighbour(WatershedPixel neighbour)
    • getNeighbours

      public List<WatershedPixel> getNeighbours()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getHeight

      public final byte getHeight()
    • getIntHeight

      public final int getIntHeight()
    • getX

      public final int getX()
    • getY

      public final int getY()
    • compareTo

      public int compareTo(WatershedPixel o)
      Method to be able to use the Collections.sort static method.
      Specified by:
      compareTo in interface Comparable<WatershedPixel>
    • setLabel

      public void setLabel(int label)
    • setLabelToINIT

      public void setLabelToINIT()
    • setLabelToMASK

      public void setLabelToMASK()
    • setLabelToWSHED

      public void setLabelToWSHED()
    • isLabelINIT

      public boolean isLabelINIT()
    • isLabelMASK

      public boolean isLabelMASK()
    • isLabelWSHED

      public boolean isLabelWSHED()
    • getLabel

      public int getLabel()
    • setDistance

      public void setDistance(int distance)
    • getDistance

      public int getDistance()
    • isFICTITIOUS

      public boolean isFICTITIOUS()
    • allNeighboursAreWSHED

      public boolean allNeighboursAreWSHED()