Class RandomBoundingBox
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.image.leftclick.AbstractLeftClickProcessor
-
- adams.gui.visualization.image.leftclick.AbstractSelectionRectangleBasedLeftClickProcessor
-
- adams.gui.visualization.image.leftclick.RandomBoundingBox
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,Randomizable,ShallowCopySupporter<AbstractLeftClickProcessor>,SizeOfHandler,ObjectPrefixHandler,ImagePanelLeftClickListener,Serializable,EventListener
public class RandomBoundingBox extends AbstractSelectionRectangleBasedLeftClickProcessor implements Randomizable
Allows the user to create randomly sized bounding boxes around the left-click position.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-prefix <java.lang.String> (property: prefix) The prefix to use for the fields in the report. default: Object.
-num-digits <int> (property: numDigits) The number of digits to use for left-padding the index with zeroes. default: 4 minimum: 0
-seed <long> (property: seed) The seed value for the random bounding boxes. default: 1
-range-width <adams.core.base.BaseInterval> (property: rangeWidth) The range of pixels for the bounding box width. default: [10;50]
-range-height <adams.core.base.BaseInterval> (property: rangeHeight) The range of pixels for the bounding box height. default: [10;50]
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Randomm_Randomthe random number generator to use.protected BaseIntervalm_RangeHeightthe range for the height.protected BaseIntervalm_RangeWidththe range for the width.protected longm_Seedthe seed value.-
Fields inherited from class adams.gui.visualization.image.leftclick.AbstractSelectionRectangleBasedLeftClickProcessor
m_Locations, m_NumDigits, m_Prefix
-
Fields inherited from class adams.gui.visualization.image.leftclick.AbstractLeftClickProcessor
m_AltDown, m_CtrlDown, m_MetaDown, m_ShiftDown
-
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 RandomBoundingBox()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected voiddoProcessClick(ImagePanel panel, Point position, int modifiersEx)Process the click that occurred in the image panel.BaseIntervalgetRangeHeight()Returns the pixel range for the bounding box height.BaseIntervalgetRangeWidth()Returns the pixel range for the bounding box width.longgetSeed()Returns the seed value.StringglobalInfo()Returns a string describing the object.StringrangeHeightTipText()Returns the tip text for this property.StringrangeWidthTipText()Returns the tip text for this property.protected voidreset()Resets the scheme.StringseedTipText()Returns the tip text for this property.voidsetRangeHeight(BaseInterval value)Sets the pixel range for the bounding box height.voidsetRangeWidth(BaseInterval value)Sets the pixel range for the bounding box width.voidsetSeed(long value)Sets the seed value.-
Methods inherited from class adams.gui.visualization.image.leftclick.AbstractSelectionRectangleBasedLeftClickProcessor
doImageChanged, findLastIndex, getDefaultNumDigits, getDefaultPrefix, getLocations, getNumDigits, getPrefix, numDigitsTipText, prefixTipText, setNumDigits, setPrefix
-
Methods inherited from class adams.gui.visualization.image.leftclick.AbstractLeftClickProcessor
altDownTipText, check, clicked, ctrlDownTipText, getAltDown, getCtrlDown, getMetaDown, getShiftDown, imageChanged, metaDownTipText, processClick, setAltDown, setCtrlDown, setMetaDown, setShiftDown, shallowCopy, shallowCopy, shiftDownTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, 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_Seed
protected long m_Seed
the seed value.
-
m_RangeWidth
protected BaseInterval m_RangeWidth
the range for the width.
-
m_RangeHeight
protected BaseInterval m_RangeHeight
the range for the height.
-
m_Random
protected Random m_Random
the random number generator to use.
-
-
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 classAbstractSelectionRectangleBasedLeftClickProcessor
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractSelectionRectangleBasedLeftClickProcessor
-
setSeed
public void setSeed(long value)
Sets the seed value.- Specified by:
setSeedin interfaceRandomizable- Parameters:
value- the seed
-
getSeed
public long getSeed()
Returns the seed value.- Specified by:
getSeedin interfaceRandomizable- Returns:
- the seed
-
seedTipText
public String seedTipText()
Returns the tip text for this property.- Specified by:
seedTipTextin interfaceRandomizable- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRangeWidth
public void setRangeWidth(BaseInterval value)
Sets the pixel range for the bounding box width.- Parameters:
value- the range
-
getRangeWidth
public BaseInterval getRangeWidth()
Returns the pixel range for the bounding box width.- Returns:
- the range
-
rangeWidthTipText
public String rangeWidthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRangeHeight
public void setRangeHeight(BaseInterval value)
Sets the pixel range for the bounding box height.- Parameters:
value- the range
-
getRangeHeight
public BaseInterval getRangeHeight()
Returns the pixel range for the bounding box height.- Returns:
- the range
-
rangeHeightTipText
public String rangeHeightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doProcessClick
protected void doProcessClick(ImagePanel panel, Point position, int modifiersEx)
Process the click that occurred in the image panel.- Specified by:
doProcessClickin classAbstractLeftClickProcessor- Parameters:
panel- the originposition- the position of the clickmodifiersEx- the associated modifiers
-
-