Class QuantizeProcessor
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.quant.QuantizeProcessor
-
- Direct Known Subclasses:
QuantizeProcessor.DoubleQuantCompressor,QuantizeProcessor.FloatQuantCompressor
public class QuantizeProcessor extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classQuantizeProcessor.BaseFilterprivate classQuantizeProcessor.DitherFilterstatic classQuantizeProcessor.DoubleQuantCompressorstatic classQuantizeProcessor.FloatQuantCompressorTODO this is done very inefficient and should be refactored!private classQuantizeProcessor.NullFilterprivate classQuantizeProcessor.PixelFilterprivate classQuantizeProcessor.ZeroFilter
-
Field Summary
Fields Modifier and Type Field Description private doublebScaleprivate doublebZeroprivate booleancenterOnZeroprivate static doubleMAX_INT_AS_DOUBLEprivate static longN_RESERVED_VALUESnumber of reserved values, starting withprivate QuantizeProcessor.PixelFilterpixelFilterprivate Quantizequantizeprotected QuantizeOptionquantizeOptionprivate static doubleROUNDING_HALFprivate static intZERO_VALUEvalue used to represent zero-valued pixels
-
Constructor Summary
Constructors Constructor Description QuantizeProcessor(QuantizeOption quantizeOption)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcalculateBZeroAndBscale()QuantizegetQuantize()private intnint(double x)booleanquantize(double[] doubles, java.nio.IntBuffer quants)voidquantize(java.nio.DoubleBuffer fdata, java.nio.IntBuffer intData)voidunquantize(java.nio.IntBuffer intData, java.nio.DoubleBuffer fdata)private doublezeroCenter()
-
-
-
Field Detail
-
MAX_INT_AS_DOUBLE
private static final double MAX_INT_AS_DOUBLE
- See Also:
- Constant Field Values
-
N_RESERVED_VALUES
private static final long N_RESERVED_VALUES
number of reserved values, starting with- See Also:
- Constant Field Values
-
ROUNDING_HALF
private static final double ROUNDING_HALF
- See Also:
- Constant Field Values
-
ZERO_VALUE
private static final int ZERO_VALUE
value used to represent zero-valued pixels- See Also:
- Constant Field Values
-
centerOnZero
private final boolean centerOnZero
-
pixelFilter
private final QuantizeProcessor.PixelFilter pixelFilter
-
bScale
private double bScale
-
bZero
private double bZero
-
quantize
private Quantize quantize
-
quantizeOption
protected final QuantizeOption quantizeOption
-
-
Constructor Detail
-
QuantizeProcessor
public QuantizeProcessor(QuantizeOption quantizeOption)
-
-
Method Detail
-
getQuantize
public Quantize getQuantize()
-
quantize
public boolean quantize(double[] doubles, java.nio.IntBuffer quants)
-
quantize
public void quantize(java.nio.DoubleBuffer fdata, java.nio.IntBuffer intData)
-
unquantize
public void unquantize(java.nio.IntBuffer intData, java.nio.DoubleBuffer fdata)
-
calculateBZeroAndBscale
private void calculateBZeroAndBscale()
-
nint
private int nint(double x)
-
zeroCenter
private double zeroCenter()
-
-