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 int
m_Alpha
the alpha value to use for the overlay (0: transparent, 255: opaque).protected Color
m_BackgroundColor
the background color to use when not using the base image.protected ColorProvider
m_ColorProvider
the color provider for generating the colors.protected boolean
m_IncludeBaseImage
whether to include the base image.protected BaseString[]
m_Layers
the 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 String
alphaTipText()
Returns the tip text for this property.String
backgroundColorTipText()
Returns the tip text for this property.String
colorProviderTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected Object
doProcess(ImageSegmentationContainer[] containers)
Performs the actual processing of the containers.Class
generates()
The type of data that is generated.int
getAlpha()
Returns the alpha value to use for the overlay: 0=transparent, 255=opaque.Color
getBackgroundColor()
Returns the color to use as background when not using the base image.ColorProvider
getColorProvider()
Returns the color provider to use.boolean
getIncludeBaseImage()
Returns whether to use the base image or a uniform background color.BaseString[]
getLayers()
Returns the layers to display, uses all if empty array.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
globalInfo()
Returns a string describing the object.String
includeBaseImageTipText()
Returns the tip text for this property.String
layersTipText()
Returns the tip text for this property.int
maxNumContainersRequired()
Returns the maximum number of containers that are required for the operation.int
minNumContainersRequired()
Returns the minimum number of containers that are required for the operation.void
setAlpha(int value)
Sets the alpha value to use for the overlay: 0=transparent, 255=opaque.void
setBackgroundColor(Color value)
Sets the color to use as background when not using the base image.void
setColorProvider(ColorProvider value)
Sets the color provider to use.void
setIncludeBaseImage(boolean value)
Sets whether to use the base image or a uniform background color.void
setLayers(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:
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 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 alphae 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:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in 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:
minNumContainersRequired
in 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:
maxNumContainersRequired
in 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:
generates
in classAbstractImageSegmentationContainerOperation
- Returns:
- the class
-
doProcess
protected Object doProcess(ImageSegmentationContainer[] containers)
Performs the actual processing of the containers.- Specified by:
doProcess
in classAbstractImageSegmentationContainerOperation
- Parameters:
containers
- the containers to process- Returns:
- the generated data
-
-