br.usp.ime.klava.segmentit.util
Class HierarchyCriterion

java.lang.Object
  extended by br.usp.ime.klava.segmentit.util.HierarchyCriterion

public class HierarchyCriterion
extends java.lang.Object

Criterion used to build hierarchies of partitions.

Author:
Bruno Klava

Field Summary
static HierarchyCriterion AREA
          Criterion of synchronous flooding, used to rank regions according to their area.
static HierarchyCriterion DEPTH
          Criterion of synchronous flooding, used to rank regions according to their contrast.
static HierarchyCriterion MEAN_VALUE
          Criterion to build hierarchies merging adjacent regions by the similarity of the mean values of their pixels.
static HierarchyCriterion MERGING_LEVEL
          Criterion of uniform flooding.
static HierarchyCriterion VOLUME
          Criterion of synchronous flooding, used to rank regions according to their contrast and area.
 
Method Summary
 AbstractMetric getMetricObject()
          Returns a new instance of the AbstractMetric associated with this HierarchyCriterion.
 java.lang.String getName()
          Returns the name of this HierarchyCriterion.
 boolean isFloodingCriterion()
          Returns if this HierarchyCriterion is a flooding criterion or a generic criterion.
static boolean isValid(java.lang.String criterionName)
          Returns if there is a valid HierarchyCriterion for the given criterionName.
static HierarchyCriterion valueOf(java.lang.String criterionName)
          Returns the HierarchyCriterion associated with the name criterionName.
static java.util.Collection<HierarchyCriterion> values()
          Returns a Collection with all the existing HierarchyCriterion.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MERGING_LEVEL

public static final HierarchyCriterion MERGING_LEVEL
Criterion of uniform flooding.


DEPTH

public static final HierarchyCriterion DEPTH
Criterion of synchronous flooding, used to rank regions according to their contrast.


AREA

public static final HierarchyCriterion AREA
Criterion of synchronous flooding, used to rank regions according to their area.


VOLUME

public static final HierarchyCriterion VOLUME
Criterion of synchronous flooding, used to rank regions according to their contrast and area.


MEAN_VALUE

public static final HierarchyCriterion MEAN_VALUE
Criterion to build hierarchies merging adjacent regions by the similarity of the mean values of their pixels.

Method Detail

getName

public java.lang.String getName()
Returns the name of this HierarchyCriterion.

Returns:
the name of this HierarchyCriterion

isFloodingCriterion

public boolean isFloodingCriterion()
Returns if this HierarchyCriterion is a flooding criterion or a generic criterion.

Returns:
true if this is a flooding criterion

isValid

public static boolean isValid(java.lang.String criterionName)
Returns if there is a valid HierarchyCriterion for the given criterionName.

Parameters:
criterionName - the String representing a HierarchyCriterion
Returns:
true if criterionName represents a valid HierarchyCriterion

valueOf

public static HierarchyCriterion valueOf(java.lang.String criterionName)
Returns the HierarchyCriterion associated with the name criterionName.

Parameters:
criterionName - a name of a HierarchyCriterion
Returns:
the HierarchyCriterion associated with the name criterionName

values

public static java.util.Collection<HierarchyCriterion> values()
Returns a Collection with all the existing HierarchyCriterion.

Returns:
a Collection with all the existing HierarchyCriterion

getMetricObject

public AbstractMetric getMetricObject()
Returns a new instance of the AbstractMetric associated with this HierarchyCriterion.

Returns:
a new instance of the AbstractMetric associated with this HierarchyCriterion