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.
- See Also:
-
Constructor Summary
Constructors -
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.intgetScale()Returns the scale parameter valueintReturns the tile height (if supported), or else 0 (also the default implementation).intReturns the tile width (if supported), or else 0 (also the default implementation).booleanChecks if this type of compression is inherently lossybooleanisSmooth()Checks if smoothing is enabledvoidsetParameters(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:ICompressOptionReturns an independent copy of this option. Modifications to the original or the copy will not affect the other.- Specified by:
copyin 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:
getCompressionParametersin 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:ICompressOptionReturns the tile height (if supported), or else 0 (also the default implementation).- Specified by:
getTileHeightin 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:ICompressOptionReturns the tile width (if supported), or else 0 (also the default implementation).- Specified by:
getTileWidthin 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:ICompressOptionChecks if this type of compression is inherently lossy- Specified by:
isLossyCompressionin interfaceICompressOption- Returns:
trueif 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:
trueif 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:
setParametersin 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-trueto enable smoothing, orfalseto disable.- Returns:
- itself
-
unwrap
Description copied from interface:ICompressOption(for internal use) Recasts these options for the specific implementation class- Specified by:
unwrapin interfaceICompressOption- Type Parameters:
T- these options recast to the designated implementation type.- Parameters:
clazz- the implementation class- Returns:
- the recast version of us or
nullif the recasting is not available for the specified class type.
-
setTileHeight
Description copied from interface:ICompressOptionSet 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:
setTileHeightin interfaceICompressOption- Parameters:
value- the new tile height in pixels- Returns:
- itself
- See Also:
-
setTileWidth
Description copied from interface:ICompressOptionSet 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:
setTileWidthin interfaceICompressOption- Parameters:
value- the new tile with in pixels- Returns:
- itself
- See Also:
-