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 intm_MaxHeightthe maximum height.protected intm_MaxWidththe maximum width.protected intm_MinHeightthe minimum height.protected intm_MinWidththe 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 voiddefineOptions()Adds options to the internal list of options.protected LocatedObjectsdoLocate(BufferedImage image, boolean annotateOnly)Performs the actual locating of the objects.intgetMaxHeight()Returns the maximum height.intgetMaxWidth()Returns the maximum width.intgetMinHeight()Returns the minimum height.intgetMinWidth()Returns the minimum width.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.StringglobalInfo()Returns a string describing the object.StringmaxHeightTipText()Returns the tip text for this property.StringmaxWidthTipText()Returns the tip text for this property.StringminHeightTipText()Returns the tip text for this property.StringminWidthTipText()Returns the tip text for this property.voidsetMaxHeight(int value)Sets the maximum height.voidsetMaxWidth(int value)Sets the maximum width.voidsetMinHeight(int value)Sets the minimum height.voidsetMinWidth(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, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
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:
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 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:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin 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:
doLocatein classAbstractObjectLocator- Parameters:
image- the image to processannotateOnly- whether to annotate only- Returns:
- the containers of located objects
-
-