Class WatershedPixel
java.lang.Object
org.hortonmachine.lesto.modules.vegetation.watershed.WatershedPixel
- All Implemented Interfaces:
java.lang.Comparable<WatershedPixel>
public class WatershedPixel extends java.lang.Object implements java.lang.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 Summary
Constructors Constructor Description WatershedPixel()WatershedPixel(int x, int y, byte height) -
Method Summary
Modifier and Type Method Description voidaddNeighbour(WatershedPixel neighbour)booleanallNeighboursAreWSHED()intcompareTo(WatershedPixel o)Method to be able to use the Collections.sort static method.intgetDistance()bytegetHeight()intgetIntHeight()intgetLabel()java.util.List<WatershedPixel>getNeighbours()intgetX()intgetY()booleanisFICTITIOUS()booleanisLabelINIT()booleanisLabelMASK()booleanisLabelWSHED()voidsetDistance(int distance)voidsetLabel(int label)voidsetLabelToINIT()voidsetLabelToMASK()voidsetLabelToWSHED()java.lang.StringtoString()
-
Constructor Details
-
WatershedPixel
public WatershedPixel(int x, int y, byte height) -
WatershedPixel
public WatershedPixel()
-
-
Method Details
-
addNeighbour
-
getNeighbours
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getHeight
public final byte getHeight() -
getIntHeight
public final int getIntHeight() -
getX
public final int getX() -
getY
public final int getY() -
compareTo
Method to be able to use the Collections.sort static method.- Specified by:
compareToin interfacejava.lang.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()
-