Class HCompressorOption
java.lang.Object
nom.tam.fits.compression.algorithm.hcompress.HCompressorOption
- All Implemented Interfaces:
Cloneable
,ICompressOption
Options to the HCompress compression algorithm. When compressing tables and images using the HCompress algorithm,
users can control how exactly the compression is perfomed. When reading compressed FITS files, these options will be
set automatically based on the header values recorded in the compressed HDU.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns an independent copy of this option.nom.tam.fits.compression.provider.param.hcompress.HCompressParameters
(for internal use) Returns the parameters that represent the settings for this option in the FITS header or compressed data column.int
getScale()
Returns the scale parameter valueint
Returns the tile height (if supported), or else 0 (also the default implementation).int
Returns the tile width (if supported), or else 0 (also the default implementation).boolean
Checks if this type of compression is inherently lossyboolean
isSmooth()
Checks if smoothing is enabledvoid
setParameters
(nom.tam.fits.compression.provider.param.api.ICompressParameters parameters) (for internal use) Sets the parameters that link the options to how they are recorded in the FITS headers or compressed table columns.setScale
(double value) Sets the scale parametersetSmooth
(boolean value) Enabled or disables smoothing.setTileHeight
(int value) Set the tile height (if the option supports it).setTileWidth
(int value) Set the tile width (if the option supports it).<T> T
(for internal use) Recasts these options for the specific implementation class
-
Constructor Details
-
HCompressorOption
public HCompressorOption()Creates a new set of options for HCompress.
-
-
Method Details
-
copy
Description copied from interface:ICompressOption
Returns an independent copy of this option. Modifications to the original or the copy will not affect the other.- Specified by:
copy
in interfaceICompressOption
- Returns:
- copy the option (normally the option from with the copy happened is saved as original).
-
getCompressionParameters
public nom.tam.fits.compression.provider.param.hcompress.HCompressParameters getCompressionParameters()Description copied from interface:ICompressOption
(for internal use) Returns the parameters that represent the settings for this option in the FITS header or compressed data column.- Specified by:
getCompressionParameters
in interfaceICompressOption
- Returns:
- the parameters that must be synchronized with the hdu meta data.
- See Also:
-
getScale
public int getScale()Returns the scale parameter value- Returns:
- the value of the scale parameter.
- See Also:
-
getTileHeight
public int getTileHeight()Description copied from interface:ICompressOption
Returns the tile height (if supported), or else 0 (also the default implementation).- Specified by:
getTileHeight
in interfaceICompressOption
- Returns:
- the tile height in pixels, or 0 if the options do not have a tile size setting.
- See Also:
-
getTileWidth
public int getTileWidth()Description copied from interface:ICompressOption
Returns the tile width (if supported), or else 0 (also the default implementation).- Specified by:
getTileWidth
in interfaceICompressOption
- Returns:
- the tile width in pixels, or 0 if the options do not have a tile size setting.
- See Also:
-
isLossyCompression
public boolean isLossyCompression()Description copied from interface:ICompressOption
Checks if this type of compression is inherently lossy- 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 befalse
.
-
isSmooth
public boolean isSmooth()Checks if smoothing is enabled- Returns:
true
if smoothing is enabled, otherwisefalse
.- See Also:
-
setParameters
public void setParameters(nom.tam.fits.compression.provider.param.api.ICompressParameters parameters) Description copied from interface:ICompressOption
(for internal use) Sets the parameters that link the options to how they are recorded in the FITS headers or compressed table columns.- Specified by:
setParameters
in interfaceICompressOption
- Parameters:
parameters
- the parameters to synchronized- See Also:
-
setScale
Sets the scale parameter- Parameters:
value
- the new scale parameter, which will be rounded to the nearest integer value for the actual implementation.- Returns:
- itself
- Throws:
IllegalArgumentException
- if the scale value is negative- See Also:
-
setSmooth
Enabled or disables smoothing.- Parameters:
value
-true
to enable smoothing, orfalse
to disable.- Returns:
- itself
-
unwrap
Description copied from interface:ICompressOption
(for internal use) Recasts these options for the specific implementation class- Specified by:
unwrap
in interfaceICompressOption
- Type Parameters:
T
- these options recast to the designated implementation type.- Parameters:
clazz
- the implementation class- Returns:
- the recast version of us or
null
if the recasting is not available for the specified class type.
-
setTileHeight
Description copied from interface:ICompressOption
Set the tile height (if the option supports it). If the implementing option class does not have a setting for tile size, it should simply ignore the setting and return normally.- Specified by:
setTileHeight
in interfaceICompressOption
- Parameters:
value
- the new tile height in pixels- Returns:
- itself
- See Also:
-
setTileWidth
Description copied from interface:ICompressOption
Set the tile width (if the option supports it). If the implementing option class does not have a setting for tile size, it should simply ignore the setting and return normally.- Specified by:
setTileWidth
in interfaceICompressOption
- Parameters:
value
- the new tile with in pixels- Returns:
- itself
- See Also:
-