Package adams.data.filter
Class HeatmapThreshold
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<Heatmap>
-
- adams.data.filter.HeatmapThreshold
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.ShallowCopySupporter<adams.data.filter.Filter>
,adams.core.SizeOfHandler
,adams.data.filter.Filter<Heatmap>
,Serializable
,Comparable
public class HeatmapThreshold extends adams.data.filter.AbstractFilter<Heatmap>
Replaces all intensity values that are either below or above a user-specified threshold, depending on the selected threshold type, using the pre-defined replacement value.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-no-id-update <boolean> (property: dontUpdateID) If enabled, suppresses updating the ID of adams.data.id.IDHandler data containers. default: false
-type <ABOVE|BELOW> (property: type) The type of threshold to use: if BELOW then all values that fall below the threshold are zeroed, if ABOVE then all values that are above the threshold are zeroed. default: BELOW
-threshold <adams.data.filter.heatmapthreshold.AbstractHeatmapThreshold> (property: threshold) The threshold algorithm to use. default: adams.data.filter.heatmapthreshold.Manual
-replacement <double> (property: replacement) The replacement value to use. default: -1.0
-replace-with-missing <boolean> (property: replaceWithMissing) If enabled, the values are replaced with missing values rather than actual values. default: false
-missing-values-handling <SKIP|REPLACE> (property: missingValuesHandling) Determines how missing values are handled when processing the heatmap, eg whether they get skipped or always replaced. default: SKIP
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HeatmapThreshold.MissingValuesHandling
Determines how missing values are treated.static class
HeatmapThreshold.Type
The type of threshold.
-
Field Summary
Fields Modifier and Type Field Description protected HeatmapThreshold.MissingValuesHandling
m_MissingValuesHandling
how missing values are treated.protected double
m_Replacement
the replacement value.protected boolean
m_ReplaceWithMissing
whether to replace with missing values.protected AbstractHeatmapThreshold
m_Threshold
the threshold.protected HeatmapThreshold.Type
m_Type
the type of threshold.
-
Constructor Summary
Constructors Constructor Description HeatmapThreshold()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.HeatmapThreshold.MissingValuesHandling
getMissingValuesHandling()
Returns how missing values are handled.double
getReplacement()
Returns the replacement value in use.boolean
getReplaceWithMissing()
Returns whether to replace the values with missing values instead.AbstractHeatmapThreshold
getThreshold()
Returns the threshold algorithm in use.HeatmapThreshold.Type
getType()
Returns the type of threshold in use.String
globalInfo()
Returns a string describing the object.String
missingValuesHandlingTipText()
Returns the tip text for this property.protected Heatmap
processData(Heatmap data)
Performs the actual filtering.String
replacementTipText()
Returns the tip text for this property.String
replaceWithMissingTipText()
Returns the tip text for this property.void
setMissingValuesHandling(HeatmapThreshold.MissingValuesHandling value)
Sets how missing values are handled.void
setReplacement(double value)
Sets the replacement value to use.void
setReplaceWithMissing(boolean value)
Sets whether to replace the values with missing values instead.void
setThreshold(AbstractHeatmapThreshold value)
Sets the threshold algorithm to use.void
setType(HeatmapThreshold.Type value)
Sets the type of threshold to use.String
thresholdTipText()
Returns the tip text for this property.String
typeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
-
-
-
Field Detail
-
m_Type
protected HeatmapThreshold.Type m_Type
the type of threshold.
-
m_Threshold
protected AbstractHeatmapThreshold m_Threshold
the threshold.
-
m_Replacement
protected double m_Replacement
the replacement value.
-
m_ReplaceWithMissing
protected boolean m_ReplaceWithMissing
whether to replace with missing values.
-
m_MissingValuesHandling
protected HeatmapThreshold.MissingValuesHandling m_MissingValuesHandling
how missing values are treated.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.data.filter.AbstractFilter<Heatmap>
-
setType
public void setType(HeatmapThreshold.Type value)
Sets the type of threshold to use.- Parameters:
value
- the type
-
getType
public HeatmapThreshold.Type getType()
Returns the type of threshold in use.- Returns:
- the type
-
typeTipText
public String typeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setThreshold
public void setThreshold(AbstractHeatmapThreshold value)
Sets the threshold algorithm to use.- Parameters:
value
- the algorithm
-
getThreshold
public AbstractHeatmapThreshold getThreshold()
Returns the threshold algorithm in use.- Returns:
- the algorithm
-
thresholdTipText
public String thresholdTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReplacement
public void setReplacement(double value)
Sets the replacement value to use.- Parameters:
value
- the replacement
-
getReplacement
public double getReplacement()
Returns the replacement value in use.- Returns:
- the replacement
-
replacementTipText
public String replacementTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReplaceWithMissing
public void setReplaceWithMissing(boolean value)
Sets whether to replace the values with missing values instead.- Parameters:
value
- true if to replace with missing
-
getReplaceWithMissing
public boolean getReplaceWithMissing()
Returns whether to replace the values with missing values instead.- Returns:
- true if to replace with missing
-
replaceWithMissingTipText
public String replaceWithMissingTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMissingValuesHandling
public void setMissingValuesHandling(HeatmapThreshold.MissingValuesHandling value)
Sets how missing values are handled.- Parameters:
value
- the handling
-
getMissingValuesHandling
public HeatmapThreshold.MissingValuesHandling getMissingValuesHandling()
Returns how missing values are handled.- Returns:
- the handling
-
missingValuesHandlingTipText
public String missingValuesHandlingTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
-