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 classHeatmapThreshold.MissingValuesHandlingDetermines how missing values are treated.static classHeatmapThreshold.TypeThe type of threshold.
-
Field Summary
Fields Modifier and Type Field Description protected HeatmapThreshold.MissingValuesHandlingm_MissingValuesHandlinghow missing values are treated.protected doublem_Replacementthe replacement value.protected booleanm_ReplaceWithMissingwhether to replace with missing values.protected AbstractHeatmapThresholdm_Thresholdthe threshold.protected HeatmapThreshold.Typem_Typethe type of threshold.
-
Constructor Summary
Constructors Constructor Description HeatmapThreshold()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.HeatmapThreshold.MissingValuesHandlinggetMissingValuesHandling()Returns how missing values are handled.doublegetReplacement()Returns the replacement value in use.booleangetReplaceWithMissing()Returns whether to replace the values with missing values instead.AbstractHeatmapThresholdgetThreshold()Returns the threshold algorithm in use.HeatmapThreshold.TypegetType()Returns the type of threshold in use.StringglobalInfo()Returns a string describing the object.StringmissingValuesHandlingTipText()Returns the tip text for this property.protected HeatmapprocessData(Heatmap data)Performs the actual filtering.StringreplacementTipText()Returns the tip text for this property.StringreplaceWithMissingTipText()Returns the tip text for this property.voidsetMissingValuesHandling(HeatmapThreshold.MissingValuesHandling value)Sets how missing values are handled.voidsetReplacement(double value)Sets the replacement value to use.voidsetReplaceWithMissing(boolean value)Sets whether to replace the values with missing values instead.voidsetThreshold(AbstractHeatmapThreshold value)Sets the threshold algorithm to use.voidsetType(HeatmapThreshold.Type value)Sets the type of threshold to use.StringthresholdTipText()Returns the tip text for this property.StringtypeTipText()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:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin 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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin 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.
-
-