Package adams.data.objectfilter
Class AbstractObjectFilter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.objectfilter.AbstractObjectFilter
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,ObjectFilter,FlowContextHandler,Serializable
- Direct Known Subclasses:
AddDefaultLabel,AttachMetaData,AttachOverlappingMetaData,ClipBoundingBoxes,KeepEnclosed,MakeSquare,MergeOverlaps,OffsetIndex,PassThrough,PolygonVertexLengths,RemoveDuplicatePolygonPoints,RemovePolygons,RenameLabels,Rotate,Scale,SimplifyPolygons,TransformMetaData,Translate,UpdateBoundsFromPolygon
public abstract class AbstractObjectFilter extends AbstractOptionHandler implements ObjectFilter
Ancestor for image object filters.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actorm_FlowContextthe flow context.-
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 AbstractObjectFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(LocatedObjects objects)Hook method for checking the object list before processing it.protected abstract LocatedObjectsdoFilter(LocatedObjects objects)Filters the image objects.LocatedObjectsfilter(LocatedObjects objects)Filters the image objects.ActorgetFlowContext()Returns the flow context, if any.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.protected booleanrequiresFlowContext()Returns whether flow context is actually required.voidsetFlowContext(Actor value)Sets the flow context.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_FlowContext
protected Actor m_FlowContext
the flow context.
-
-
Method Detail
-
setFlowContext
public void setFlowContext(Actor value)
Sets the flow context.- Specified by:
setFlowContextin interfaceFlowContextHandler- Parameters:
value- the actor
-
getFlowContext
public Actor getFlowContext()
Returns the flow context, if any.- Specified by:
getFlowContextin interfaceFlowContextHandler- Returns:
- the actor, null if none available
-
requiresFlowContext
protected boolean requiresFlowContext()
Returns whether flow context is actually required.- Returns:
- true if required
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Returns:
- null if no info available, otherwise short string
-
check
protected String check(LocatedObjects objects)
Hook method for checking the object list before processing it.- Parameters:
objects- the object list to check- Returns:
- null if successful, otherwise error message
-
doFilter
protected abstract LocatedObjects doFilter(LocatedObjects objects)
Filters the image objects.- Parameters:
objects- the objects to filter- Returns:
- the updated object list
-
filter
public LocatedObjects filter(LocatedObjects objects)
Filters the image objects.- Specified by:
filterin interfaceObjectFilter- Parameters:
objects- the objects to filter- Returns:
- the updated object list
-
-