Package adams.data.objectfilter
Class SimplifyPolygons
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.objectfilter.AbstractObjectFilter
-
- adams.data.objectfilter.SimplifyPolygons
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,ObjectFilter
,FlowContextHandler
,Serializable
public class SimplifyPolygons extends AbstractObjectFilter
Simplifies polygons, i.e., to use fewer points. Useful for polygons generated by models, which can be very detailed.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimplifyPolygons.PPoint
Container class for the simplification.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_HighQuality
whether to use high-quality or fast simplification.protected double
m_Tolerance
the tolerance parameter.-
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 SimplifyPolygons()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected LocatedObjects
doFilter(LocatedObjects objects)
Filters the image objects.boolean
getHighQuality()
Returns whether to generate high-quality of be fast.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.double
getTolerance()
Returns the tolerance for the simplification.String
globalInfo()
Returns a string describing the object.String
highQualityTipText()
Returns the tip text for this property.void
setHighQuality(boolean value)
Sets whether to generate high-quality of be fast.void
setTolerance(double value)
Sets the tolerance for the simplification.String
toleranceTipText()
Returns the tip text for this property.-
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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setTolerance
public void setTolerance(double value)
Sets the tolerance for the simplification.- Parameters:
value
- the tolerance
-
getTolerance
public double getTolerance()
Returns the tolerance for the simplification.- Returns:
- the tolerance
-
toleranceTipText
public String toleranceTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setHighQuality
public void setHighQuality(boolean value)
Sets whether to generate high-quality of be fast.- Parameters:
value
- true if high-quality
-
getHighQuality
public boolean getHighQuality()
Returns whether to generate high-quality of be fast.- Returns:
- true if high-quality
-
highQualityTipText
public String highQualityTipText()
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:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractObjectFilter
- Returns:
- null if no info available, otherwise short string
-
doFilter
protected LocatedObjects doFilter(LocatedObjects objects)
Filters the image objects.- Specified by:
doFilter
in classAbstractObjectFilter
- Parameters:
objects
- the objects to filter- Returns:
- the updated object list
-
-