skyview.util
Class SqrtScaler

java.lang.Object
  extended by skyview.util.Scaler
      extended by skyview.util.SqrtScaler

public class SqrtScaler
extends Scaler

Scale an object linearly.


Constructor Summary
SqrtScaler()
          Provide default scaler that positive values will scale the array as the square root between 0-255.
SqrtScaler(double minVal, double maxVal, int minOutput, int maxOutput, boolean scaleNegative)
          Provide a scaler with a specified scaling range to a specified range of bytes.
 
Method Summary
protected  void prepareScaling(double[] c)
          Prepare to scale the data
protected  byte scale(double val)
          Scale an value.
 
Methods inherited from class skyview.util.Scaler
getMaxOutput, getMaxVal, getMinOutput, getMinVal, getUseDefault, scaleArray, setMaxVal, setMinMax, setMinVal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqrtScaler

public SqrtScaler()
Provide default scaler that positive values will scale the array as the square root between 0-255.


SqrtScaler

public SqrtScaler(double minVal,
                  double maxVal,
                  int minOutput,
                  int maxOutput,
                  boolean scaleNegative)
Provide a scaler with a specified scaling range to a specified range of bytes.

Method Detail

prepareScaling

protected void prepareScaling(double[] c)
Prepare to scale the data

Specified by:
prepareScaling in class Scaler
Parameters:
c - Array to be scaled.

scale

protected byte scale(double val)
Scale an value.

Specified by:
scale in class Scaler
Parameters:
val - The value to be scaled.