Class 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 Detail

      • m_MinAmplitude

        protected float m_MinAmplitude
        the minimum amplitude to use.
      • m_MaxAmplitude

        protected float m_MaxAmplitude
        the maximum amplitude to use.
    • Constructor Detail

      • AbstractSpectrumImageGeneratorWithRange

        public AbstractSpectrumImageGeneratorWithRange()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractSpectrumImageGenerator
      • 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 class AbstractSpectrumImageGenerator
        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