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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final int
private static final double
private static final int
DO NOT CHANGE THIS; used when quantizing real numbersprivate int
private static final int
private static final double
private final double[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(long ditherSeed) private double[]
protected void
double
protected double
toDouble
(int pixel) protected int
toInt
(double pixel)
-
Field Details
-
LAST_RANDOM_VALUE
private static final int LAST_RANDOM_VALUE- See Also:
-
MAX_INT_AS_DOUBLE
private static final double MAX_INT_AS_DOUBLE- See Also:
-
N_RANDOM
private static final int N_RANDOMDO NOT CHANGE THIS; used when quantizing real numbers- See Also:
-
RANDOM_MULTIPLICATOR
private static final int RANDOM_MULTIPLICATOR- See Also:
-
RANDOM_START_VALUE
private static final double RANDOM_START_VALUE- See Also:
-
iseed
private int iseed -
nextRandom
private int nextRandom -
randomValues
private final double[] randomValues
-
-
Constructor Details
-
DitherFilter
DitherFilter(long seed)
-
-
Method Details
-
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
-