Class QuantizeProcessor.DitherFilter
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.quant.QuantizeProcessor.PixelFilter
-
- nom.tam.fits.compression.algorithm.quant.QuantizeProcessor.DitherFilter
-
- Enclosing class:
- QuantizeProcessor
private class QuantizeProcessor.DitherFilter extends QuantizeProcessor.PixelFilter
-
-
Field Summary
Fields Modifier and Type Field Description private int
iseed
private static int
LAST_RANDOM_VALUE
private static double
MAX_INT_AS_DOUBLE
private static int
N_RANDOM
DO NOT CHANGE THIS; used when quantizing real numbersprivate int
nextRandom
private static int
RANDOM_MULTIPLICATOR
private static double
RANDOM_START_VALUE
private double[]
randomValues
-
Constructor Summary
Constructors Constructor Description DitherFilter(long seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(long ditherSeed)
private double[]
initRandoms()
protected void
nextPixel()
double
nextRandom()
protected double
toDouble(int pixel)
protected int
toInt(double pixel)
-
-
-
Field Detail
-
LAST_RANDOM_VALUE
private static final int LAST_RANDOM_VALUE
- See Also:
- Constant Field Values
-
MAX_INT_AS_DOUBLE
private static final double MAX_INT_AS_DOUBLE
- See Also:
- Constant Field Values
-
N_RANDOM
private static final int N_RANDOM
DO NOT CHANGE THIS; used when quantizing real numbers- See Also:
- Constant Field Values
-
RANDOM_MULTIPLICATOR
private static final int RANDOM_MULTIPLICATOR
- See Also:
- Constant Field Values
-
RANDOM_START_VALUE
private static final double RANDOM_START_VALUE
- See Also:
- Constant Field Values
-
iseed
private int iseed
-
nextRandom
private int nextRandom
-
randomValues
private final double[] randomValues
-
-
Method Detail
-
initialize
public void initialize(long ditherSeed)
-
nextRandom
public double nextRandom()
-
initRandoms
private double[] initRandoms()
-
nextPixel
protected void nextPixel()
- Overrides:
nextPixel
in classQuantizeProcessor.PixelFilter
-
toDouble
protected double toDouble(int pixel)
- Overrides:
toDouble
in classQuantizeProcessor.PixelFilter
-
toInt
protected int toInt(double pixel)
- Overrides:
toInt
in classQuantizeProcessor.PixelFilter
-
-