Package adams.data.image.moments
Class AbstractBufferedImageMoment
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.image.moments.AbstractMoment<BufferedImageContainer>
-
- adams.data.image.moments.AbstractBufferedImageMoment
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
CentralMoment
,Moment
,NormalizedMoment
public abstract class AbstractBufferedImageMoment extends AbstractMoment<BufferedImageContainer>
Ancestor for moments for BufferedImage containers.- Version:
- $Revision$
- Author:
- sjb90
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_BackgroundValue
the value of the background colour.-
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 AbstractBufferedImageMoment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
backgroundValueTipText()
Returns the tip text for this property.protected boolean
check(BufferedImageContainer img)
Hook method for performing checks on the image.void
defineOptions()
Adds options to the internal list of options.Color
getBackgroundValue()
Returns the background color.boolean[][]
imageToMatrix(BufferedImageContainer img)
Takes an image of type T and returns a boolean matrix that can be used for momentsstatic boolean[][]
imageToMatrix(BufferedImageContainer img, Color background)
Takes an image of type T and returns a boolean matrix that can be used for momentsvoid
setBackgroundValue(Color value)
Sets the background color.-
Methods inherited from class adams.data.image.moments.AbstractMoment
calculate, doCalculate
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
-
-
-
-
Field Detail
-
m_BackgroundValue
protected Color m_BackgroundValue
the value of the background colour.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setBackgroundValue
public void setBackgroundValue(Color value)
Sets the background color.- Parameters:
value
- the color
-
backgroundValueTipText
public String backgroundValueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getBackgroundValue
public Color getBackgroundValue()
Returns the background color.- Returns:
- the color
-
check
protected boolean check(BufferedImageContainer img)
Hook method for performing checks on the image.- Specified by:
check
in classAbstractMoment<BufferedImageContainer>
- Parameters:
img
- the image to check- Returns:
- true if successful
-
imageToMatrix
public boolean[][] imageToMatrix(BufferedImageContainer img)
Takes an image of type T and returns a boolean matrix that can be used for moments- Specified by:
imageToMatrix
in classAbstractMoment<BufferedImageContainer>
- Parameters:
img
- the image- Returns:
- the boolean matrix representing the image
-
imageToMatrix
public static boolean[][] imageToMatrix(BufferedImageContainer img, Color background)
Takes an image of type T and returns a boolean matrix that can be used for moments- Parameters:
img
- the imagebackground
- the background color- Returns:
- the boolean matrix representing the image
-
-