Class CroppedLocator
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Stoppable
,Serializable
public class CroppedLocator extends AbstractMetaObjectLocator
Uses the defined crop algorithm to first crop the image before locating objects. The locations get adjusted to fit the original image.
-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
-crop <adams.data.image.transformer.crop.AbstractCropAlgorithm> (property: crop) The crop algorithm to apply to the image. default: adams.data.image.transformer.crop.NoCrop
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractCropAlgorithm
m_Crop
the crop algorithm to use.-
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 CroppedLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
cropTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected LocatedObjects
doLocate(BufferedImage image, boolean annotateOnly)
Performs the actual locating of the objects.AbstractCropAlgorithm
getCrop()
Returns the crop algorithm.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.String
globalInfo()
Returns a string describing the object.void
setCrop(AbstractCropAlgorithm value)
Sets the crop algorithm.-
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
-
-
-
-
Field Detail
-
m_Crop
protected AbstractCropAlgorithm m_Crop
the crop algorithm to use.
-
-
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
-
setCrop
public void setCrop(AbstractCropAlgorithm value)
Sets the crop algorithm.- Parameters:
value
- the algorithm
-
getCrop
public AbstractCropAlgorithm getCrop()
Returns the crop algorithm.- Returns:
- the algorithm
-
cropTipText
public String cropTipText()
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
-
-