Class QuantizeOption
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.quant.QuantizeOption
-
- All Implemented Interfaces:
java.lang.Cloneable
,ICompressOption
- Direct Known Subclasses:
HCompressorQuantizeOption
,RiceQuantizeCompressOption
public class QuantizeOption extends java.lang.Object implements ICompressOption
-
-
Field Summary
Fields Modifier and Type Field Description private double
bScale
private double
bZero
private boolean
centerOnZero
private boolean
checkNull
private boolean
checkZero
private boolean
dither
private boolean
dither2
private int
intMaxValue
private int
intMinValue
private double
maxValue
private double
minValue
private static int
NULL_VALUE
and including NULL_VALUE.private double
nullValue
private java.lang.Integer
nullValueIndicator
private QuantizeOption
original
protected ICompressParameters
parameters
private double
qlevel
private long
seed
private int
tileHeight
private int
tileWidth
-
Constructor Summary
Constructors Constructor Description QuantizeOption()
-
Method Summary
-
-
-
Field Detail
-
NULL_VALUE
private static final int NULL_VALUE
and including NULL_VALUE. These values may not be used to represent the quantized and scaled floating point pixel values If lossy Hcompression is used, and the tiledImageOperation contains null values, then it is also possible for the compressed values to slightly exceed the range of the actual (lossless) values so we must reserve a little more space value used to represent undefined pixels- See Also:
- Constant Field Values
-
parameters
protected ICompressParameters parameters
-
bScale
private double bScale
-
bZero
private double bZero
-
centerOnZero
private boolean centerOnZero
-
checkNull
private boolean checkNull
-
checkZero
private boolean checkZero
-
dither
private boolean dither
-
dither2
private boolean dither2
-
intMaxValue
private int intMaxValue
-
intMinValue
private int intMinValue
-
maxValue
private double maxValue
-
minValue
private double minValue
-
nullValue
private double nullValue
-
nullValueIndicator
private java.lang.Integer nullValueIndicator
-
qlevel
private double qlevel
-
seed
private long seed
-
tileHeight
private int tileHeight
-
tileWidth
private int tileWidth
-
original
private QuantizeOption original
-
-
Method Detail
-
copy
public QuantizeOption copy()
- Specified by:
copy
in interfaceICompressOption
- Returns:
- copy the option (normally the option from with the copy happened is saved as original).
-
getBNull
public java.lang.Integer getBNull()
-
getBScale
public double getBScale()
-
getBZero
public double getBZero()
-
getCompressionParameters
public ICompressParameters getCompressionParameters()
- Specified by:
getCompressionParameters
in interfaceICompressOption
- Returns:
- the parameters that must be synchronized with the hdu meta data.
-
getCompressOption
public <T> T getCompressOption(java.lang.Class<T> clazz)
-
getIntMaxValue
public int getIntMaxValue()
-
getIntMinValue
public int getIntMinValue()
-
getMaxValue
public double getMaxValue()
-
getMinValue
public double getMinValue()
-
getNullValue
public double getNullValue()
-
getNullValueIndicator
public java.lang.Integer getNullValueIndicator()
-
getOriginal
public QuantizeOption getOriginal()
-
getQLevel
public double getQLevel()
-
getSeed
public long getSeed()
-
getTileHeight
public int getTileHeight()
-
getTileWidth
public int getTileWidth()
-
isCenterOnZero
public boolean isCenterOnZero()
-
isCheckNull
public boolean isCheckNull()
-
isCheckZero
public boolean isCheckZero()
-
isDither
public boolean isDither()
-
isDither2
public boolean isDither2()
-
isLossyCompression
public boolean isLossyCompression()
- Specified by:
isLossyCompression
in interfaceICompressOption
- Returns:
- true if the compression done with this specified options uses approximations. That means if the reconstruction of the data is excact the return should be false.
-
setBNull
public ICompressOption setBNull(java.lang.Integer blank)
-
setBScale
public QuantizeOption setBScale(double value)
-
setBZero
public QuantizeOption setBZero(double value)
-
setCenterOnZero
public QuantizeOption setCenterOnZero(boolean value)
-
setCheckNull
public QuantizeOption setCheckNull(boolean value)
-
setCheckZero
public QuantizeOption setCheckZero(boolean value)
-
setDither
public QuantizeOption setDither(boolean value)
-
setDither2
public QuantizeOption setDither2(boolean value)
-
setIntMaxValue
public QuantizeOption setIntMaxValue(int value)
-
setIntMinValue
public QuantizeOption setIntMinValue(int value)
-
setMaxValue
public QuantizeOption setMaxValue(double value)
-
setMinValue
public QuantizeOption setMinValue(double value)
-
setNullValue
public QuantizeOption setNullValue(double value)
-
setParameters
public void setParameters(ICompressParameters parameters)
Description copied from interface:ICompressOption
set the parameters that must be synchronized with the hdu meta data.- Specified by:
setParameters
in interfaceICompressOption
- Parameters:
parameters
- the parameters to synchronized
-
setQlevel
public QuantizeOption setQlevel(double value)
-
setSeed
public QuantizeOption setSeed(long value)
-
setTileHeight
public QuantizeOption setTileHeight(int value)
Description copied from interface:ICompressOption
set the tile height in pixel.- Specified by:
setTileHeight
in interfaceICompressOption
- Parameters:
value
- the number of pixel.- Returns:
- this (builder pattern)
-
setTileWidth
public QuantizeOption setTileWidth(int value)
Description copied from interface:ICompressOption
set the tile width.- Specified by:
setTileWidth
in interfaceICompressOption
- Parameters:
value
- the number of pixel.- Returns:
- this (builder pattern)
-
unwrap
public <T> T unwrap(java.lang.Class<T> clazz)
Description copied from interface:ICompressOption
un wrap a specific implementation detail.- Specified by:
unwrap
in interfaceICompressOption
- Type Parameters:
T
- the class to unrwap- Parameters:
clazz
- the type to unwrap- Returns:
- the implementation detail or null if no such detail is avalable.
-
setOriginal
private QuantizeOption setOriginal(QuantizeOption quantizeOption)
-
-