Class RiceCompressOption
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.rice.RiceCompressOption
-
- All Implemented Interfaces:
java.lang.Cloneable
,ICompressOption
public class RiceCompressOption extends java.lang.Object implements ICompressOption
-
-
Field Summary
Fields Modifier and Type Field Description private int
blockSize
private java.lang.Integer
bytePix
static int
DEFAULT_RICE_BLOCKSIZE
static int
DEFAULT_RICE_BYTEPIX
private RiceCompressOption
original
private ICompressParameters
parameters
this is a circular dependency that still has to be cut.
-
Constructor Summary
Constructors Constructor Description RiceCompressOption()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RiceCompressOption
copy()
int
getBlockSize()
int
getBytePix()
ICompressParameters
getCompressionParameters()
boolean
isLossyCompression()
RiceCompressOption
setBlockSize(int value)
RiceCompressOption
setBytePix(int value)
protected RiceCompressOption
setDefaultBytePix(int defaultBytePix)
private RiceCompressOption
setOriginal(RiceCompressOption riceCompressOption)
void
setParameters(ICompressParameters parameters)
set the parameters that must be synchronized with the hdu meta data.RiceCompressOption
setTileHeight(int value)
set the tile height in pixel.RiceCompressOption
setTileWidth(int value)
set the tile width.<T> T
unwrap(java.lang.Class<T> clazz)
un wrap a specific implementation detail.
-
-
-
Field Detail
-
DEFAULT_RICE_BLOCKSIZE
public static final int DEFAULT_RICE_BLOCKSIZE
- See Also:
- Constant Field Values
-
DEFAULT_RICE_BYTEPIX
public static final int DEFAULT_RICE_BYTEPIX
-
parameters
private ICompressParameters parameters
this is a circular dependency that still has to be cut.
-
blockSize
private int blockSize
-
bytePix
private java.lang.Integer bytePix
-
original
private RiceCompressOption original
-
-
Method Detail
-
copy
public RiceCompressOption copy()
- Specified by:
copy
in interfaceICompressOption
- Returns:
- copy the option (normally the option from with the copy happened is saved as original).
-
getBlockSize
public int getBlockSize()
-
getBytePix
public int getBytePix()
-
getCompressionParameters
public ICompressParameters getCompressionParameters()
- Specified by:
getCompressionParameters
in interfaceICompressOption
- Returns:
- the parameters that must be synchronized with the hdu meta data.
-
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.
-
setBlockSize
public RiceCompressOption setBlockSize(int value)
-
setBytePix
public RiceCompressOption setBytePix(int 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
-
setTileHeight
public RiceCompressOption 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 RiceCompressOption 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 RiceCompressOption setOriginal(RiceCompressOption riceCompressOption)
-
setDefaultBytePix
protected RiceCompressOption setDefaultBytePix(int defaultBytePix)
-
-