Package adams.data.objectfilter
Class PolygonVertexLengths
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.objectfilter.AbstractObjectFilter
-
- adams.data.objectfilter.PolygonVertexLengths
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,ObjectFilter,FlowContextHandler,Serializable
public class PolygonVertexLengths extends AbstractObjectFilter
Calculates the lengths of the polygon's vertices and stores them in the object's meta-data as comma-separated list.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Keythe meta-data key to store the lengths as comma-separated list.-
Fields inherited from class adams.data.objectfilter.AbstractObjectFilter
m_FlowContext
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description PolygonVertexLengths()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected doubledist(int x0, int y0, int x1, int y1)Calculates the distance between the two points.protected LocatedObjectsdoFilter(LocatedObjects objects)Filters the image objects.StringgetKey()Returns the meta-data key for the vertices.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringglobalInfo()Returns a string describing the object.StringkeyTipText()Returns the tip text for this property.voidsetKey(String value)Sets the meta-data key for the vertices.-
Methods inherited from class adams.data.objectfilter.AbstractObjectFilter
check, filter, getFlowContext, requiresFlowContext, setFlowContext
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Key
protected String m_Key
the meta-data key to store the lengths as comma-separated list.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setKey
public void setKey(String value)
Sets the meta-data key for the vertices.- Parameters:
value- the key
-
getKey
public String getKey()
Returns the meta-data key for the vertices.- Returns:
- the key
-
keyTipText
public String keyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractObjectFilter- Returns:
- null if no info available, otherwise short string
-
dist
protected double dist(int x0, int y0, int x1, int y1)Calculates the distance between the two points.- Parameters:
x0- the x of the 1st pointy0- the y of the 1st pointx1- the x of the 2nd pointy1- the y of the 2nd point- Returns:
- the distance
-
doFilter
protected LocatedObjects doFilter(LocatedObjects objects)
Filters the image objects.- Specified by:
doFilterin classAbstractObjectFilter- Parameters:
objects- the objects to filter- Returns:
- the updated object list
-
-