Package adams.data.spectrumimage
Class AbstractSpectrumImageGeneratorWithRange
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.spectrumimage.AbstractSpectrumImageGenerator
-
- adams.data.spectrumimage.AbstractSpectrumImageGeneratorWithRange
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
AmplitudeRatio
,Intensity
,Spectrogram
public abstract class AbstractSpectrumImageGeneratorWithRange extends AbstractSpectrumImageGenerator
Ancestor for spectrum image generators that limit the amplitude ranges.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected float
m_MaxAmplitude
the maximum amplitude to use.protected float
m_MinAmplitude
the minimum amplitude to use.-
Fields inherited from class adams.data.spectrumimage.AbstractSpectrumImageGenerator
m_ImageType
-
-
Constructor Summary
Constructors Constructor Description AbstractSpectrumImageGeneratorWithRange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
check(Spectrum spectrum)
Hook method for checks before generating the image.void
defineOptions()
Adds options to the internal list of options.protected float
getDefaultMaxAmplitude()
Returns the default maximum amplitude.protected float
getDefaultMinAmplitude()
Returns the default minimum amplitude.protected Float
getLowerMaxAmplitude()
Returns the lower bound for the maximum amplitude.protected Float
getLowerMinAmplitude()
Returns the lower bound for the minimum amplitude.float
getMaxAmplitude()
Returns the maximum amplitude to assume.float
getMinAmplitude()
Returns the minimum amplitude to assume.protected Float
getUpperMaxAmplitude()
Returns the upper bound for the maximum amplitude.protected Float
getUpperMinAmplitude()
Returns the upper bound for the minimum amplitude.String
maxAmplitudeTipText()
Returns the tip text for this property.String
minAmplitudeTipText()
Returns the tip text for this property.protected float
rangeCheck(float ampl)
Makes sure that the amplitude is within the defined ranges.void
setMaxAmplitude(float value)
Sets the maximum amplitude to assume.void
setMinAmplitude(float value)
Sets the minimum amplitude to assume.-
Methods inherited from class adams.data.spectrumimage.AbstractSpectrumImageGenerator
doGenerate, generate, getImageType, imageTypeTipText, newImage, setImageType, setPixel
-
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
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractSpectrumImageGenerator
-
getDefaultMinAmplitude
protected float getDefaultMinAmplitude()
Returns the default minimum amplitude.- Returns:
- the minimum
-
getLowerMinAmplitude
protected Float getLowerMinAmplitude()
Returns the lower bound for the minimum amplitude.- Returns:
- the lower bound, null if unbounded
-
getUpperMinAmplitude
protected Float getUpperMinAmplitude()
Returns the upper bound for the minimum amplitude.- Returns:
- the upper bound, null if unbounded
-
setMinAmplitude
public void setMinAmplitude(float value)
Sets the minimum amplitude to assume.- Parameters:
value
- the minimum
-
getMinAmplitude
public float getMinAmplitude()
Returns the minimum amplitude to assume.- Returns:
- the minimum
-
minAmplitudeTipText
public String minAmplitudeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultMaxAmplitude
protected float getDefaultMaxAmplitude()
Returns the default maximum amplitude.- Returns:
- the minimum
-
getLowerMaxAmplitude
protected Float getLowerMaxAmplitude()
Returns the lower bound for the maximum amplitude.- Returns:
- the lower bound, null if unbounded
-
getUpperMaxAmplitude
protected Float getUpperMaxAmplitude()
Returns the upper bound for the maximum amplitude.- Returns:
- the upper bound, null if unbounded
-
setMaxAmplitude
public void setMaxAmplitude(float value)
Sets the maximum amplitude to assume.- Parameters:
value
- the maximum
-
getMaxAmplitude
public float getMaxAmplitude()
Returns the maximum amplitude to assume.- Returns:
- the maximum
-
maxAmplitudeTipText
public String maxAmplitudeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected String check(Spectrum spectrum)
Hook method for checks before generating the image.- Overrides:
check
in classAbstractSpectrumImageGenerator
- Parameters:
spectrum
- the spectrum to check- Returns:
- null if successful, otherwise the error message
-
rangeCheck
protected float rangeCheck(float ampl)
Makes sure that the amplitude is within the defined ranges.- Parameters:
ampl
- the amplitude to process- Returns:
- the (potentially) updated amplitude
-
-