Package adams.data.image.moments
Class NormalizedMoment
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class NormalizedMoment extends AbstractBufferedImageMoment
The normalized moment.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-background-value <java.awt.Color> (property: backgroundValue) The background color to use. default: #ffffff
-p <int> (property: P) The exponent for x. default: 0
-q <int> (property: Q) The exponent for y. default: 0
- Version:
- $Revision$
- Author:
- sjb90
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_P
exponent for x.protected int
m_Q
exponent for y.-
Fields inherited from class adams.data.image.moments.AbstractBufferedImageMoment
m_BackgroundValue
-
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 NormalizedMoment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected double
doCalculate(boolean[][] img)
Performs the actual calculation.int
getP()
Returns the exponent for x.int
getQ()
Returns the exponent for y.String
globalInfo()
Returns a string describing the object.String
PTipText()
Returns the tip text for this property.String
QTipText()
Returns the tip text for this property.void
setP(int value)
Sets the exponent for x.void
setQ(int value)
Sets the exponent for y.-
Methods inherited from class adams.data.image.moments.AbstractBufferedImageMoment
backgroundValueTipText, check, getBackgroundValue, imageToMatrix, imageToMatrix, setBackgroundValue
-
Methods inherited from class adams.data.image.moments.AbstractMoment
calculate
-
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
-
-
-
-
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. Derived classes must override this method to add additional options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractBufferedImageMoment
-
setP
public void setP(int value)
Sets the exponent for x.- Parameters:
value
- the exponent
-
getP
public int getP()
Returns the exponent for x.- Returns:
- the exponent
-
PTipText
public String PTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setQ
public void setQ(int value)
Sets the exponent for y.- Parameters:
value
- the exponent
-
getQ
public int getQ()
Returns the exponent for y.- Returns:
- the exponent
-
QTipText
public String QTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doCalculate
protected double doCalculate(boolean[][] img)
Description copied from class:AbstractMoment
Performs the actual calculation.- Specified by:
doCalculate
in classAbstractMoment<BufferedImageContainer>
- Parameters:
img
- the image to process- Returns:
- the calculated moment
-
-