Class DoubleMatrixToBufferedImage

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractConversion>, SizeOfHandler, Stoppable, Conversion, Serializable

    public class DoubleMatrixToBufferedImage
    extends AbstractConversion
    Turns a matrix of double values into a BufferedImage.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -generator <adams.gui.visualization.core.ColorGradientGenerator> (property: generator)
        The generator to use for creating the gradient colors.
        default: adams.gui.visualization.core.BiColorGenerator
     
    -missing-value-color <java.awt.Color> (property: missingValueColor)
        The color to use for missing values (ie NaN values).
        default: #00ffffff
     
    -use-fixed-range <boolean> (property: useFixedRange)
        Whether to use pre-defined min/max values or ones determined from the heatmap
        itself.
        default: false
     
    -min <double> (property: min)
        The minimum to use in case of using a fixed range.
        default: 0.0
     
    -max <double> (property: max)
        The maximum to use in case of using a fixed range.
        default: 100.0
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_MissingValueColor

        protected Color m_MissingValueColor
        the color for missing values.
      • m_UseFixedRange

        protected boolean m_UseFixedRange
        whether to use a fixed min/max.
      • m_Min

        protected double m_Min
        the fixed min.
      • m_Max

        protected double m_Max
        the fixed max.
      • m_GradientColors

        protected Color[] m_GradientColors
        the gradient colors.
    • Constructor Detail

      • DoubleMatrixToBufferedImage

        public DoubleMatrixToBufferedImage()
    • Method Detail

      • setGenerator

        public void setGenerator​(ColorGradientGenerator value)
        Sets the color generator.
        Parameters:
        value - the generator
      • getGenerator

        public ColorGradientGenerator getGenerator()
        Returns the color generator.
        Returns:
        the generator
      • generatorTipText

        public String generatorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMissingValueColor

        public void setMissingValueColor​(Color value)
        Sets the color for missing values.
        Parameters:
        value - the color
      • getMissingValueColor

        public Color getMissingValueColor()
        Returns the color for missing values.
        Returns:
        the color
      • missingValueColorTipText

        public String missingValueColorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setUseFixedRange

        public void setUseFixedRange​(boolean value)
        Sets whether to use a fixed range.
        Parameters:
        value - true if to use fixed range
      • getUseFixedRange

        public boolean getUseFixedRange()
        Returns whether to use a fixed range.
        Returns:
        true if to use fixed range
      • useFixedRangeTipText

        public String useFixedRangeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMin

        public void setMin​(double value)
        Sets the minimum in case of using a fixed range.
        Parameters:
        value - the minimum
      • getMin

        public double getMin()
        Returns the minimum in case of using a fixed range.
        Returns:
        the minimum
      • minTipText

        public String minTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMax

        public void setMax​(double value)
        Sets the maximum in case of using a fixed range.
        Parameters:
        value - the maximum
      • getMax

        public double getMax()
        Returns the maximum in case of using a fixed range.
        Returns:
        the maximum
      • maxTipText

        public String maxTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getGradientColors

        protected Color[] getGradientColors()
        Generates the gradient colors.
        Returns:
        the colors
      • checkData

        protected String checkData()
        Checks whether the data can be processed.
        Overrides:
        checkData in class AbstractConversion
        Returns:
        null if checks passed, otherwise error message