FeatureExtractor.Clustering
Class Cluster

java.lang.Object
  extended by FeatureExtractor.Clustering.Cluster

public class Cluster
extends java.lang.Object

A generic cluster, composed of a representative point and the set of pixels associated to it.


Constructor Summary
Cluster()
          Basic constructor.
 
Method Summary
 void add(Pixel p)
          Adds a new pixel to the cluster.
 Pixel getPixel(int pos)
          Returns the pixel at a specified position.
 java.util.Vector<Pixel> getPixels()
          Returns all the pixels of this cluster.
 ClusteringFeatures getRepresentativePoint()
          Returns the cluster representative point.
 void removeAllPixels()
          Removes all the pixels of this cluster.
 void setRepresentativePoint(ClusteringFeatures c)
          Modifies the cluster representative point.
 int size()
          Returns the size of the cluster, i.e., the number of its pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cluster

public Cluster()
Basic constructor.

Method Detail

setRepresentativePoint

public void setRepresentativePoint(ClusteringFeatures c)
Modifies the cluster representative point.

Parameters:
c - The new representative point.

getRepresentativePoint

public ClusteringFeatures getRepresentativePoint()
Returns the cluster representative point.

Returns:
The cluster representative point.

add

public void add(Pixel p)
Adds a new pixel to the cluster.

Parameters:
p - Pixel to be added to this cluster.

removeAllPixels

public void removeAllPixels()
Removes all the pixels of this cluster.


size

public int size()
Returns the size of the cluster, i.e., the number of its pixels.

Returns:
The number of pixels in this cluster.

getPixel

public Pixel getPixel(int pos)
Returns the pixel at a specified position.

Parameters:
pos - Requested position.
Returns:
The requested pixel.

getPixels

public java.util.Vector<Pixel> getPixels()
Returns all the pixels of this cluster.

Returns:
Vector containing all the pixels in this cluster.