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 floatm_MaxAmplitudethe maximum amplitude to use.protected floatm_MinAmplitudethe 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 Stringcheck(Spectrum spectrum)Hook method for checks before generating the image.voiddefineOptions()Adds options to the internal list of options.protected floatgetDefaultMaxAmplitude()Returns the default maximum amplitude.protected floatgetDefaultMinAmplitude()Returns the default minimum amplitude.protected FloatgetLowerMaxAmplitude()Returns the lower bound for the maximum amplitude.protected FloatgetLowerMinAmplitude()Returns the lower bound for the minimum amplitude.floatgetMaxAmplitude()Returns the maximum amplitude to assume.floatgetMinAmplitude()Returns the minimum amplitude to assume.protected FloatgetUpperMaxAmplitude()Returns the upper bound for the maximum amplitude.protected FloatgetUpperMinAmplitude()Returns the upper bound for the minimum amplitude.StringmaxAmplitudeTipText()Returns the tip text for this property.StringminAmplitudeTipText()Returns the tip text for this property.protected floatrangeCheck(float ampl)Makes sure that the amplitude is within the defined ranges.voidsetMaxAmplitude(float value)Sets the maximum amplitude to assume.voidsetMinAmplitude(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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin 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:
checkin 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
-
-