Class SimpleOverlay
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.imagesegmentation.operation.AbstractImageSegmentationContainerOperation
-
- adams.data.imagesegmentation.operation.SimpleOverlay
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Serializable
public class SimpleOverlay extends AbstractImageSegmentationContainerOperation
Combines base image (or just background color) and layers into a single image.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_Alphathe alpha value to use for the overlay (0: transparent, 255: opaque).protected Colorm_BackgroundColorthe background color to use when not using the base image.protected ColorProviderm_ColorProviderthe color provider for generating the colors.protected booleanm_IncludeBaseImagewhether to include the base image.protected BaseString[]m_Layersthe layers to use.-
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 SimpleOverlay()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringalphaTipText()Returns the tip text for this property.StringbackgroundColorTipText()Returns the tip text for this property.StringcolorProviderTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected ObjectdoProcess(ImageSegmentationContainer[] containers)Performs the actual processing of the containers.Classgenerates()The type of data that is generated.intgetAlpha()Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.ColorgetBackgroundColor()Returns the color to use as background when not using the base image.ColorProvidergetColorProvider()Returns the color provider to use.booleangetIncludeBaseImage()Returns whether to use the base image or a uniform background color.BaseString[]getLayers()Returns the layers to display, uses all if empty array.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringglobalInfo()Returns a string describing the object.StringincludeBaseImageTipText()Returns the tip text for this property.StringlayersTipText()Returns the tip text for this property.intmaxNumContainersRequired()Returns the maximum number of containers that are required for the operation.intminNumContainersRequired()Returns the minimum number of containers that are required for the operation.voidsetAlpha(int value)Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.voidsetBackgroundColor(Color value)Sets the color to use as background when not using the base image.voidsetColorProvider(ColorProvider value)Sets the color provider to use.voidsetIncludeBaseImage(boolean value)Sets whether to use the base image or a uniform background color.voidsetLayers(BaseString[] value)Sets the layers to display, uses all if empty array.-
Methods inherited from class adams.data.imagesegmentation.operation.AbstractImageSegmentationContainerOperation
check, checkSameDimensions, checkSameDimensions, process
-
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
-
-
-
-
Field Detail
-
m_IncludeBaseImage
protected boolean m_IncludeBaseImage
whether to include the base image.
-
m_BackgroundColor
protected Color m_BackgroundColor
the background color to use when not using the base image.
-
m_Layers
protected BaseString[] m_Layers
the layers to use.
-
m_ColorProvider
protected ColorProvider m_ColorProvider
the color provider for generating the colors.
-
m_Alpha
protected int m_Alpha
the alpha value to use for the overlay (0: transparent, 255: opaque).
-
-
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
-
setIncludeBaseImage
public void setIncludeBaseImage(boolean value)
Sets whether to use the base image or a uniform background color.- Parameters:
value- true if to use
-
getIncludeBaseImage
public boolean getIncludeBaseImage()
Returns whether to use the base image or a uniform background color.- Returns:
- true if to use
-
includeBaseImageTipText
public String includeBaseImageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBackgroundColor
public void setBackgroundColor(Color value)
Sets the color to use as background when not using the base image.- Parameters:
value- the background color
-
getBackgroundColor
public Color getBackgroundColor()
Returns the color to use as background when not using the base image.- Returns:
- the background color
-
backgroundColorTipText
public String backgroundColorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLayers
public void setLayers(BaseString[] value)
Sets the layers to display, uses all if empty array.- Parameters:
value- the layers
-
getLayers
public BaseString[] getLayers()
Returns the layers to display, uses all if empty array.- Returns:
- the layers
-
layersTipText
public String layersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColorProvider
public void setColorProvider(ColorProvider value)
Sets the color provider to use.- Parameters:
value- the color provider
-
getColorProvider
public ColorProvider getColorProvider()
Returns the color provider to use.- Returns:
- the color provider
-
colorProviderTipText
public String colorProviderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setAlpha
public void setAlpha(int value)
Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.- Parameters:
value- the alpha value
-
getAlpha
public int getAlpha()
Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.- Returns:
- the alpha value
-
alphaTipText
public String alphaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractImageSegmentationContainerOperation- Returns:
- null if no info available, otherwise short string
-
minNumContainersRequired
public int minNumContainersRequired()
Returns the minimum number of containers that are required for the operation.- Specified by:
minNumContainersRequiredin classAbstractImageSegmentationContainerOperation- Returns:
- the number of containers that are required, <= 0 means no lower limit
-
maxNumContainersRequired
public int maxNumContainersRequired()
Returns the maximum number of containers that are required for the operation.- Specified by:
maxNumContainersRequiredin classAbstractImageSegmentationContainerOperation- Returns:
- the number of containers that are required, <= 0 means no upper limit
-
generates
public Class generates()
The type of data that is generated.- Specified by:
generatesin classAbstractImageSegmentationContainerOperation- Returns:
- the class
-
doProcess
protected Object doProcess(ImageSegmentationContainer[] containers)
Performs the actual processing of the containers.- Specified by:
doProcessin classAbstractImageSegmentationContainerOperation- Parameters:
containers- the containers to process- Returns:
- the generated data
-
-