Package skyview.util

Class Scaler

java.lang.Object
skyview.util.Scaler
Direct Known Subclasses:
HistScaler, LinearScaler, LogScaler, SqrtScaler

public abstract class Scaler
extends java.lang.Object
Scale an object.
  • Constructor Summary

    Constructors 
    Constructor Description
    Scaler()
    Provide default scaler.
    Scaler​(double minVal, double maxVal, int minOutput, int maxOutput)
    Provide a scaler with a specified scaling range to a specified range of bytes.
  • Method Summary

    Modifier and Type Method Description
    protected int getMaxOutput()  
    protected double getMaxVal()  
    protected int getMinOutput()  
    protected double getMinVal()  
    protected boolean getUseDefault()  
    protected abstract void prepareScaling​(double[] array)
    Get ready for scaling in this particular instance.
    protected abstract byte scale​(double val)
    Scale a single number.
    java.lang.Object scaleArray​(java.lang.Object array)
    Scale an array assumed to be a double array of arbitrary dimensionality.
    protected void setMaxVal​(double maxVal)  
    protected void setMinMax​(double[] c)  
    protected void setMinVal​(double minVal)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Scaler

      public Scaler()
      Provide default scaler.
    • Scaler

      public Scaler​(double minVal, double maxVal, int minOutput, int maxOutput)
      Provide a scaler with a specified scaling range to a specified range of bytes.
  • Method Details

    • getUseDefault

      protected boolean getUseDefault()
    • getMinVal

      protected double getMinVal()
    • getMaxVal

      protected double getMaxVal()
    • getMinOutput

      protected int getMinOutput()
    • getMaxOutput

      protected int getMaxOutput()
    • setMinVal

      protected void setMinVal​(double minVal)
    • setMaxVal

      protected void setMaxVal​(double maxVal)
    • scaleArray

      public java.lang.Object scaleArray​(java.lang.Object array)
      Scale an array assumed to be a double array of arbitrary dimensionality.
    • setMinMax

      protected void setMinMax​(double[] c)
    • prepareScaling

      protected abstract void prepareScaling​(double[] array)
      Get ready for scaling in this particular instance.
    • scale

      protected abstract byte scale​(double val)
      Scale a single number.