Class SizeFilter
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Stoppable
,Serializable
public class SizeFilter extends AbstractMetaObjectLocator
Allows filtering the located objects based on the min/max width/height.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-locator <adams.flow.transformer.locateobjects.AbstractObjectLocator> (property: locator) The base locator to use. default: adams.flow.transformer.locateobjects.PassThrough
-min-width <int> (property: minWidth) The minimum width; ignored if <= 0. default: -1 minimum: -1
-max-width <int> (property: maxWidth) The maximum width; ignored if <= 0. default: -1 minimum: -1
-min-height <int> (property: minHeight) The minimum height; ignored if <= 0. default: -1 minimum: -1
-max-height <int> (property: maxHeight) The maximum height; ignored if <= 0. default: -1 minimum: -1
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_MaxHeight
the maximum height.protected int
m_MaxWidth
the maximum width.protected int
m_MinHeight
the minimum height.protected int
m_MinWidth
the minimum width.-
Fields inherited from class adams.flow.transformer.locateobjects.AbstractMetaObjectLocator
m_Locator
-
Fields inherited from class adams.flow.transformer.locateobjects.AbstractObjectLocator
m_CanvasColor, m_CanvasHeight, m_CanvasWidth, m_CenterOnCanvas, m_Errors, m_Stopped, m_Warnings
-
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 SizeFilter()
-
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
doLocate(BufferedImage image, boolean annotateOnly)
Performs the actual locating of the objects.int
getMaxHeight()
Returns the maximum height.int
getMaxWidth()
Returns the maximum width.int
getMinHeight()
Returns the minimum height.int
getMinWidth()
Returns the minimum width.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.String
globalInfo()
Returns a string describing the object.String
maxHeightTipText()
Returns the tip text for this property.String
maxWidthTipText()
Returns the tip text for this property.String
minHeightTipText()
Returns the tip text for this property.String
minWidthTipText()
Returns the tip text for this property.void
setMaxHeight(int value)
Sets the maximum height.void
setMaxWidth(int value)
Sets the maximum width.void
setMinHeight(int value)
Sets the minimum height.void
setMinWidth(int value)
Sets the minimum width.-
Methods inherited from class adams.flow.transformer.locateobjects.AbstractMetaObjectLocator
check, getLocator, locatorTipText, setLocator
-
Methods inherited from class adams.flow.transformer.locateobjects.AbstractObjectLocator
addError, addWarning, annotate, canvasColorTipText, canvasHeightTipText, canvasWidthTipText, centerOnCanvas, centerOnCanvasTipText, cleanUp, destroy, getCanvasColor, getCanvasHeight, getCanvasWidth, getCenterOnCanvas, getDefaultCanvasColor, getDefaultCanvasHeight, getDefaultCanvasWidth, getDefaultCenterOnCanvas, getErrors, getWarnings, hasErrors, hasWarnings, initialize, locate, reset, setCanvasColor, setCanvasHeight, setCanvasWidth, setCenterOnCanvas, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, 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.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
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 classAbstractMetaObjectLocator
-
setMinWidth
public void setMinWidth(int value)
Sets the minimum width.- Parameters:
value
- the width
-
getMinWidth
public int getMinWidth()
Returns the minimum width.- Returns:
- the width
-
minWidthTipText
public String minWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMaxWidth
public void setMaxWidth(int value)
Sets the maximum width.- Parameters:
value
- the width
-
getMaxWidth
public int getMaxWidth()
Returns the maximum width.- Returns:
- the width
-
maxWidthTipText
public String maxWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMinHeight
public void setMinHeight(int value)
Sets the minimum height.- Parameters:
value
- the height
-
getMinHeight
public int getMinHeight()
Returns the minimum height.- Returns:
- the height
-
minHeightTipText
public String minHeightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMaxHeight
public void setMaxHeight(int value)
Sets the maximum height.- Parameters:
value
- the height
-
getMaxHeight
public int getMaxHeight()
Returns the maximum height.- Returns:
- the height
-
maxHeightTipText
public String maxHeightTipText()
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 object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractMetaObjectLocator
- Returns:
- null if no info available, otherwise short string
-
doLocate
protected LocatedObjects doLocate(BufferedImage image, boolean annotateOnly)
Performs the actual locating of the objects.- Specified by:
doLocate
in classAbstractObjectLocator
- Parameters:
image
- the image to processannotateOnly
- whether to annotate only- Returns:
- the containers of located objects
-
-