Package adams.data.image.features
Class AbstractCountColor
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractImageFeatureGenerator>
,SizeOfHandler
,Serializable
,Comparable
- Direct Known Subclasses:
CountColor
,CountColorOutside
public abstract class AbstractCountColor extends AbstractBufferedImageFeatureGenerator
Ancestor for feature generators that count pixels based on color.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
m_Color
the color to count.protected boolean
m_UsePercentage
whether to return the percentage instead of absolute count.-
Fields inherited from class adams.data.image.AbstractImageFeatureGenerator
m_Converter, m_Fields, m_Notes, m_Prefix
-
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 AbstractCountColor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
colorTipText()
Returns the tip text for this property.HeaderDefinition
createHeader(BufferedImageContainer img)
Creates the header from a template image.void
defineOptions()
Adds options to the internal list of options.Color
getColor()
Returns the color to count.boolean
getUsePercentage()
Returns whether to output percentage instead of absolute count.void
setColor(Color value)
Sets the color to count.void
setUsePercentage(boolean value)
Sets whether to output percentage instead of absolute count.String
usePercentageTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.image.AbstractImageFeatureGenerator
checkData, cleanUp, compareTo, converterTipText, destroy, equals, fieldsTipText, generate, generateRows, getConverter, getDatasetFormat, getFields, getNotes, getPrefix, getRowFormat, notesTipText, postProcessHeader, postProcessRow, postProcessRows, prefixTipText, reset, setConverter, setFields, setNotes, setPrefix, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Color
protected Color m_Color
the color to count.
-
m_UsePercentage
protected boolean m_UsePercentage
whether to return the percentage instead of absolute count.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractImageFeatureGenerator<BufferedImageContainer>
-
setColor
public void setColor(Color value)
Sets the color to count.- Parameters:
value
- the color
-
getColor
public Color getColor()
Returns the color to count.- 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.
-
setUsePercentage
public void setUsePercentage(boolean value)
Sets whether to output percentage instead of absolute count.- Parameters:
value
- the color
-
getUsePercentage
public boolean getUsePercentage()
Returns whether to output percentage instead of absolute count.- Returns:
- true if to output percentage
-
usePercentageTipText
public String usePercentageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
createHeader
public HeaderDefinition createHeader(BufferedImageContainer img)
Creates the header from a template image.- Specified by:
createHeader
in classAbstractImageFeatureGenerator<BufferedImageContainer>
- Parameters:
img
- the image to act as a template- Returns:
- the generated header
-
-