Class ClusteredPixel

java.lang.Object
isula.image.util.ClusteredPixel

public class ClusteredPixel extends Object
  • Constructor Details

    • ClusteredPixel

      public ClusteredPixel(int coordinateForX, int coordinateForY, double[][] imageGraph, int cluster)
      Creates a new pixel and associates it to a Cluster.
      Parameters:
      coordinateForX - X coordinate.
      coordinateForY - Y coordinate.
      imageGraph - Graph representing the image.
      cluster - Assigned cluster.
  • Method Details

    • getxCoordinate

      public int getxCoordinate()
    • setxCoordinate

      public void setxCoordinate(int coordinateForX)
    • getyCoordinate

      public int getyCoordinate()
    • setyCoordinate

      public void setyCoordinate(int coordinateForY)
    • getGreyScaleValue

      public int getGreyScaleValue()
    • setGreyScaleValue

      public void setGreyScaleValue(int greyScaleValue)
    • getCluster

      public int getCluster()
    • setCluster

      public void setCluster(int cluster)
    • toString

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

      public List<ClusteredPixel> getNeighbourhood(ClusteredPixel[] partition, double[][] imageGraph)
      Return a neighborhood in reference to a partition.
      Parameters:
      partition - Partition.
      imageGraph - Graph of the image.
      Returns:
      Neighbours of the current pixel.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object