Package adams.data.image.moments
Class CentralMoment
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Serializable
public class CentralMoment extends AbstractBufferedImageMoment
The central 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 intm_Pexponent for x.protected intm_Qexponent 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 CentralMoment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected doubledoCalculate(boolean[][] img)Performs the actual calculation.intgetP()Returns the exponent for x.intgetQ()Returns the exponent for y.StringglobalInfo()Returns a string describing the object.StringPTipText()Returns the tip text for this property.StringQTipText()Returns the tip text for this property.voidsetP(int value)Sets the exponent for x.voidsetQ(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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin 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:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin 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)
Performs the actual calculation.- Specified by:
doCalculatein classAbstractMoment<BufferedImageContainer>- Parameters:
img- the image to process- Returns:
- the calculated moment
-
-