infomat.algorithms.labeling
Class CentroidLabeler

java.lang.Object
  extended by infomat.algorithms.labeling.Labeler
      extended by infomat.algorithms.labeling.CentroidLabeler
All Implemented Interfaces:
HasProperties

public class CentroidLabeler
extends Labeler

Constructs ILabels for IObjectGroups, the first in the centroid.


Field Summary
 
Fields inherited from class infomat.algorithms.labeling.Labeler
properties
 
Constructor Summary
CentroidLabeler()
           
CentroidLabeler(Properties properties)
           
 
Method Summary
 Properties getDefaultProperties()
           
 Properties getProperties()
           
 java.lang.Object getPropertyValue(java.lang.String name)
           
 java.util.HashMap<IObjectGroup,ILabel> labelGrouping(IObjectGrouping ioging, SparseISimilarity similarity)
          Constructs ILables for all IObjectGroup:s in the IObjectGrouping by choosing the higest ranked IObject:s in the centroids.
 ILabel labelSingleGroup(IObjectGroup iog, SparseISimilarity similarity)
          Constructs ILables for the IObjectGroup by choosing the higest ranked IObject:s in the centroid.
 void setProperties(Properties properties)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class infomat.algorithms.labeling.Labeler
getSortedGroupRepresentation, printLabeling, printLabeling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CentroidLabeler

public CentroidLabeler()

CentroidLabeler

public CentroidLabeler(Properties properties)
Method Detail

getDefaultProperties

public Properties getDefaultProperties()

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws PropertyNotFoundException
Throws:
PropertyNotFoundException

getProperties

public Properties getProperties()

setProperties

public void setProperties(Properties properties)

labelSingleGroup

public ILabel labelSingleGroup(IObjectGroup iog,
                               SparseISimilarity similarity)
Constructs ILables for the IObjectGroup by choosing the higest ranked IObject:s in the centroid. Overrides most of the Labler Properties. Only looks at "Number of objects in labels".


labelGrouping

public java.util.HashMap<IObjectGroup,ILabel> labelGrouping(IObjectGrouping ioging,
                                                            SparseISimilarity similarity)
Constructs ILables for all IObjectGroup:s in the IObjectGrouping by choosing the higest ranked IObject:s in the centroids.

Specified by:
labelGrouping in class Labeler