adams.gui.visualization.heatmap
Class CentroidOverlay

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.gui.visualization.image.AbstractImageOverlay
              extended by adams.gui.visualization.heatmap.AbstractHeatmapOverlay
                  extended by adams.gui.visualization.heatmap.CentroidOverlay
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, ImageOverlay, Serializable

public class CentroidOverlay
extends AbstractHeatmapOverlay

Paints the centroid's location over the heatmap image.

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
 
-enabled (property: enabled)
    If enabled, this overlay is painted over the image.
 
-color <java.awt.Color> (property: color)
    The color for the overlay.
    default: #ff0000
 

Version:
$Revision: 6027 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Centroid, Serialized Form

Field Summary
protected  double[] m_Centroid
          the calculated centroid.
protected  Color m_Color
          the color to paint the centroid in.
 
Fields inherited from class adams.gui.visualization.heatmap.AbstractHeatmapOverlay
m_HeatmapPanel
 
Fields inherited from class adams.gui.visualization.image.AbstractImageOverlay
m_Enabled
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
CentroidOverlay()
           
 
Method Summary
protected  void calcCentroid()
          Calculates the centroid.
 String colorTipText()
          Returns the tip text for this property.
 void defineOptions()
          Adds options to the internal list of options.
protected  void doPaintOverlay(ImagePanel.PaintPanel panel, Graphics g)
          Paints the overlay over the image.
 Color getColor()
          Returns the color for the overlay.
 String globalInfo()
          Returns a string describing the object.
protected  void reset()
          Resets the overlay.
 void setColor(Color value)
          Sets the color for the overlay.
 
Methods inherited from class adams.gui.visualization.heatmap.AbstractHeatmapOverlay
getHeatmapPanel, paintOverlay, setHeatmapPanel
 
Methods inherited from class adams.gui.visualization.image.AbstractImageOverlay
enabledTipText, isEnabled, setEnabled
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, 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_Centroid

protected double[] m_Centroid
the calculated centroid.


m_Color

protected Color m_Color
the color to paint the centroid in.

Constructor Detail

CentroidOverlay

public CentroidOverlay()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
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 AbstractImageOverlay

reset

protected void reset()
Resets the overlay.

Overrides:
reset in class AbstractOptionHandler

setColor

public void setColor(Color value)
Sets the color for the overlay.

Parameters:
value - the color

getColor

public Color getColor()
Returns the color for the overlay.

Returns:
the color

colorTipText

public String colorTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

calcCentroid

protected void calcCentroid()
Calculates the centroid.


doPaintOverlay

protected void doPaintOverlay(ImagePanel.PaintPanel panel,
                              Graphics g)
Paints the overlay over the image.

Specified by:
doPaintOverlay in class AbstractImageOverlay
Parameters:
panel - the panel this overlay is for
g - the graphics context


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