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 class
QuantizeProcessor.BaseFilter
private class
QuantizeProcessor.DitherFilter
static class
QuantizeProcessor.DoubleQuantCompressor
static class
QuantizeProcessor.FloatQuantCompressor
TODO this is done very inefficient and should be refactored!private class
QuantizeProcessor.NullFilter
private class
QuantizeProcessor.PixelFilter
private class
QuantizeProcessor.ZeroFilter
-
Field Summary
Fields Modifier and Type Field Description private double
bScale
private double
bZero
private boolean
centerOnZero
private static double
MAX_INT_AS_DOUBLE
private static long
N_RESERVED_VALUES
number of reserved values, starting withprivate QuantizeProcessor.PixelFilter
pixelFilter
private Quantize
quantize
protected QuantizeOption
quantizeOption
private static double
ROUNDING_HALF
private static int
ZERO_VALUE
value 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 void
calculateBZeroAndBscale()
Quantize
getQuantize()
private int
nint(double x)
boolean
quantize(double[] doubles, java.nio.IntBuffer quants)
void
quantize(java.nio.DoubleBuffer fdata, java.nio.IntBuffer intData)
void
unquantize(java.nio.IntBuffer intData, java.nio.DoubleBuffer fdata)
private double
zeroCenter()
-
-
-
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()
-
-