Document
Class Region

java.lang.Object
  extended by Document.Region
Direct Known Subclasses:
WindsurfRegion

public abstract class Region
extends java.lang.Object

Abstract class representing a single region


Field Summary
protected  ImageID id
          The ID of this region
protected  int size
          The number of pixels in this region
 
Constructor Summary
Region(ImageID id)
          Creates a region with a particular ID.
 
Method Summary
abstract  double distance(Region r)
          Abstract method for computing the distance to another region.
 ImageID getID()
          Returns the region ID.
 int getSize()
          Returns the size of the region (i.e., the number of its pixels).
 void setID(ImageID id)
          Modifies the region ID.
protected  void setSize(int s)
          Modifies the size of the region (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
 

Field Detail

size

protected int size
The number of pixels in this region


id

protected ImageID id
The ID of this region

Constructor Detail

Region

public Region(ImageID id)
Creates a region with a particular ID.

Parameters:
id - ID of the region.
Method Detail

getID

public ImageID getID()
Returns the region ID.

Returns:
ID of the region.

getSize

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

Returns:
the size of the region.

setID

public void setID(ImageID id)
Modifies the region ID.

Parameters:
id - new ID for the region.

setSize

protected void setSize(int s)
Modifies the size of the region (i.e., the number of its pixels).

Parameters:
s - the size of the region.

distance

public abstract double distance(Region r)
Abstract method for computing the distance to another region.

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