Package adams.data.imagefilter
Class TransparentBackground
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.imagefilter.AbstractImageFilterProvider
-
- adams.data.imagefilter.TransparentBackground
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Serializable
public class TransparentBackground extends AbstractImageFilterProvider
Uses the color at the specified location as background and turns it transparent.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-x <adams.core.Index> (property: X) The X position of the pixel to get the color of the background from. default: example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
-y <adams.core.Index> (property: Y) The Y position of the pixel to get the color of the background from. default: example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Indexm_Xthe X position of the background pixel.protected Indexm_Ythe Y position of the background pixel.-
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 TransparentBackground()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected ImageFilterdoGenerate(BufferedImage img)Generates the actorImageFilterinstance.IndexgetX()Returns the Y position of the background pixel.IndexgetY()Returns the Y position of the background pixel.StringglobalInfo()Returns a string describing the object.voidsetX(Index value)Sets the X position of the background pixel.voidsetY(Index value)Sets the Y position of the background pixel.StringXTipText()Returns the tip text for this property.StringYTipText()Returns the tip text for this property.-
Methods inherited from class adams.data.imagefilter.AbstractImageFilterProvider
check, generate, imageToBufferedImage
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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.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 classAbstractOptionHandler
-
setX
public void setX(Index value)
Sets the X position of the background pixel.- Parameters:
value- the position
-
getX
public Index getX()
Returns the Y position of the background pixel.- Returns:
- the position
-
XTipText
public String XTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setY
public void setY(Index value)
Sets the Y position of the background pixel.- Parameters:
value- the position
-
getY
public Index getY()
Returns the Y position of the background pixel.- Returns:
- the position
-
YTipText
public String YTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
doGenerate
protected ImageFilter doGenerate(BufferedImage img)
Generates the actorImageFilterinstance.- Specified by:
doGeneratein classAbstractImageFilterProvider- Parameters:
img- the buffered image to filter- Returns:
- the image filter instance
-
-