adams.flow.transformer.pixelselector
Class ClassificationOverlay

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.transformer.pixelselector.AbstractPixelSelectorOverlay
              extended by adams.flow.transformer.pixelselector.AbstractSingleColorPixelSelectorOverlay
                  extended by adams.flow.transformer.pixelselector.ClassificationOverlay
All Implemented Interfaces:
Debuggable, Destroyable, 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: 4828 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
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_DebugLevel, m_OptionManager
 
Constructor Summary
ClassificationOverlay()
           
 
Method Summary
 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 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
getImage, globalInfo, paintOverlay, setImage, shallowCopy, shallowCopy
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_ShowIndex

protected boolean m_ShowIndex
whether to display the index.


m_ShowLabel

protected boolean m_ShowLabel
whether to display the label.

Constructor Detail

ClassificationOverlay

public ClassificationOverlay()
Method Detail

getGlobalInfo

protected String getGlobalInfo()
Returns a string describing the object.

Specified by:
getGlobalInfo in class AbstractPixelSelectorOverlay
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 interface OptionHandler
Overrides:
defineOptions in class AbstractSingleColorPixelSelectorOverlay

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.

getSuggestedActions

public Class[] getSuggestedActions()
Returns some actions that generate data for this overlay.

Specified by:
getSuggestedActions in class AbstractPixelSelectorOverlay
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 class AbstractPixelSelectorOverlay
Parameters:
panel - the panel this overlay is for
g - the graphics context


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.