Document.Windsurf
Class WindsurfRegion

java.lang.Object
  extended by Document.Region
      extended by Document.Windsurf.WindsurfRegion

public class WindsurfRegion
extends Region

Class representing a Windsurf region


Field Summary
 
Fields inherited from class Document.Region
id, size
 
Constructor Summary
WindsurfRegion(java.lang.String[] s)
          Creates a region from an array of strings.
WindsurfRegion(WaveletFilterOutput filOut, ClusteringOutput clustOut, int id)
          Creates a region with a particular ID from the output of the Wavelet filter and the clustering algorithm.
 
Method Summary
 double distance(Region r)
          Method for computing the distance to another region.
 double distance(WindsurfRegion r)
          Specific method for computing the distance to another region.
 java.lang.String featuresToString()
          Returns a string representation of the features of this region.
 WindsurfBand getBandAt(int numBand)
          Returns a specific band of this region.
 WindsurfBand[] getBands()
          Returns the array of bands in this region.
 double[] getCentroid()
          Returns the centroid of this region.
 double[] getCovMatrix()
          Returns the covariance matrix of this region.
static int getNumBands()
          Returns the number of bands of each region.
static double normalize(double distance)
          Normalizes the distance between regions in the interval [0,1].
 java.lang.String toString()
          Returns a string representation of this region.
static void useNoSizes()
          Tells the class not to use region sizes in determining region distance
static void useSizes()
          Tells the class to use region sizes in determining region distance
 
Methods inherited from class Document.Region
getID, getSize, setID, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindsurfRegion

public WindsurfRegion(WaveletFilterOutput filOut,
                      ClusteringOutput clustOut,
                      int id)
Creates a region with a particular ID from the output of the Wavelet filter and the clustering algorithm.

Parameters:
filOut - output of the Wavelet filter.
clustOut - output of the k-means clustering algorithm.
id - ID of the image.

WindsurfRegion

public WindsurfRegion(java.lang.String[] s)
Creates a region from an array of strings.

Parameters:
s - Array of strings containing ID and features.
Method Detail

useSizes

public static void useSizes()
Tells the class to use region sizes in determining region distance


useNoSizes

public static void useNoSizes()
Tells the class not to use region sizes in determining region distance


getNumBands

public static int getNumBands()
Returns the number of bands of each region.

Returns:
The number of bands of each region.

getBands

public WindsurfBand[] getBands()
Returns the array of bands in this region.

Returns:
The array of bands in this region.

getBandAt

public WindsurfBand getBandAt(int numBand)
Returns a specific band of this region.

Parameters:
numBand - Number of specific requested band.
Returns:
The requested band (null if such band does not exist).

featuresToString

public java.lang.String featuresToString()
Returns a string representation of the features of this region.

Returns:
A string representation of the features of this region.

toString

public java.lang.String toString()
Returns a string representation of this region.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this region.

distance

public double distance(Region r)
Method for computing the distance to another region.

Specified by:
distance in class Region
Parameters:
r - Region to be compared.
Returns:
The distance between the two regions.

distance

public double distance(WindsurfRegion r)
Specific method for computing the distance to another region.

Parameters:
r - Region to be compared.
Returns:
The distance between the two regions.

normalize

public static double normalize(double distance)
Normalizes the distance between regions in the interval [0,1].

Parameters:
distance - Distance value to be normalized.
Returns:
Normalized distance value.

getCentroid

public double[] getCentroid()
Returns the centroid of this region.

Returns:
The centroid of this region.

getCovMatrix

public double[] getCovMatrix()
Returns the covariance matrix of this region.

Returns:
The covariance matrix of this region.