Class ClassificationOverlay
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.pixelselector.AbstractPixelSelectorOverlay
-
- adams.flow.transformer.pixelselector.AbstractSingleColorPixelSelectorOverlay
-
- adams.flow.transformer.pixelselector.ClassificationOverlay
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractPixelSelectorOverlay>
,SizeOfHandler
,ImageOverlay
,Serializable
public class ClassificationOverlay extends AbstractSingleColorPixelSelectorOverlay
Highlights the chosen classifications.
Some actions that generate data for this overlay:
adams.flow.transformer.pixelselector.AddClassification
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-color <java.awt.Color> (property: color) The color to use for the overlay. default: #ff0000
-show-index (property: showIndex) If enabled, the index is shown as part of the text accompanying the location of the pixel.
-show-label (property: showLabel) If enabled, the classification label is shown as part of the text accompanying the location of the pixel.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_ShowIndex
whether to display the index.protected boolean
m_ShowLabel
whether to display the label.-
Fields inherited from class adams.flow.transformer.pixelselector.AbstractSingleColorPixelSelectorOverlay
m_Color
-
Fields inherited from class adams.flow.transformer.pixelselector.AbstractPixelSelectorOverlay
m_Image
-
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 ClassificationOverlay()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected void
doPaintOverlay(ImagePanel.PaintPanel panel, Graphics g)
Paints the actual overlay over the image.protected Integer[]
getClassificationIndices()
Returns the classification indices.protected String
getGlobalInfo()
Returns a string describing the object.protected Point
getPixelLocation(int index)
Returns the pixel location to paint.boolean
getShowIndex()
Returns whether the index is shown.boolean
getShowLabel()
Returns whether the label is shown.Class[]
getSuggestedActions()
Returns some actions that generate data for this overlay.void
imageChanged(ImagePanel.PaintPanel panel)
Notifies the overlay that the image has changed.void
setShowIndex(boolean value)
Sets whether to show the index.void
setShowLabel(boolean value)
Sets whether to show the label.String
showIndexTipText()
Returns the tip text for this property.String
showLabelTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.pixelselector.AbstractSingleColorPixelSelectorOverlay
colorTipText, getColor, getDefaultColor, setColor
-
Methods inherited from class adams.flow.transformer.pixelselector.AbstractPixelSelectorOverlay
cleanUp, getImage, globalInfo, overlayAdded, overlayRemoved, paintOverlay, setImage, shallowCopy, shallowCopy
-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
getGlobalInfo
protected String getGlobalInfo()
Returns a string describing the object.- Specified by:
getGlobalInfo
in classAbstractPixelSelectorOverlay
- 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 classAbstractSingleColorPixelSelectorOverlay
-
setShowIndex
public void setShowIndex(boolean value)
Sets whether to show the index.- Parameters:
value
- if true then the index is displayed
-
getShowIndex
public boolean getShowIndex()
Returns whether the index is shown.- Returns:
- true if the index is displayed
-
showIndexTipText
public String showIndexTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShowLabel
public void setShowLabel(boolean value)
Sets whether to show the label.- Parameters:
value
- if true then the label is displayed
-
getShowLabel
public boolean getShowLabel()
Returns whether the label is shown.- Returns:
- true if the label is displayed
-
showLabelTipText
public String showLabelTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
imageChanged
public void imageChanged(ImagePanel.PaintPanel panel)
Notifies the overlay that the image has changed.- Parameters:
panel
- the panel this overlay belongs to
-
getSuggestedActions
public Class[] getSuggestedActions()
Returns some actions that generate data for this overlay.- Specified by:
getSuggestedActions
in classAbstractPixelSelectorOverlay
- Returns:
- the actions
-
getClassificationIndices
protected Integer[] getClassificationIndices()
Returns the classification indices.- Returns:
- the indices
-
getPixelLocation
protected Point getPixelLocation(int index)
Returns the pixel location to paint.- Parameters:
index
- the pixel location- Returns:
- the location, null if none found
-
doPaintOverlay
protected void doPaintOverlay(ImagePanel.PaintPanel panel, Graphics g)
Paints the actual overlay over the image.- Specified by:
doPaintOverlay
in classAbstractPixelSelectorOverlay
- Parameters:
panel
- the panel this overlay is forg
- the graphics context
-
-