public enum Compression extends Enum<Compression> implements IFitsHeader
IFitsHeader.HDU, IFitsHeader.SOURCE, IFitsHeader.VALUE
Enum Constant and Description |
---|
ZBITPIX
(required keyword) The value field of this keyword shall contain an
integer that gives the value of the BITPIX keyword in the uncompressed
FITS image.
|
ZBLANK
When using the quantization method to compress floating-point images,
this header is used to store the integer value that represents undefined
pixels (if any) in the scaled integer pixel values.
|
ZBLOCKED
Deprecated.
|
ZCMPTYPE
(required keyword) The value field of this keyword shall contain a
character string giving the name of the algorithm that must be used to
decompress the image.
|
ZDATASUM
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZDITHER0
(optional keyword) The value field of this keyword shall contain an
integer that gives the seed value for the random dithering pattern that
was used when quantizing the floating-point pixel values.
|
ZEXTEND
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZGCOUNT
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZHECKSUM
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZIMAGE
(required keyword) This keyword must have the logical value T.
|
ZMASKCMP
(optional keyword) Used to record the name of the image compression
algorithm that was used to compress the optional null pixel data mask.
|
ZNAMEn
(optional keywords) These pairs of optional array keywords (where n is an
integer index number starting with 1) supply the name and value,
respectively, of any algorithm-specific parameters that are needed to
compress o r uncompress the image.
|
ZNAXIS
(required keyword) The value field of this keyword shall contain an
integer that gives the value of the NAXIS keyword in the uncompressed
FITS image.
|
ZNAXISn
(required keywords) The value field of these keywords shall contain a
positive integer that gives the value of the NAXISn keywords in the
uncompressed FITS image.
|
ZPCOUNT
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZQUANTIZ
(optional keyword) This keyword records the name of the algorithm that
was used to quantize floating-point image pixels into integer values
which are then passed to the compression algorithm.
|
ZSIMPLE
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZTENSION
The following optional keyword is defined to store a verbatim copy of the
the value and comment field of the corresponding keyword in the original
uncompressed FITS image.
|
ZTILEn
(optional keywords) The value of these indexed keywords (where n ranges
from 1 to ZNAXIS ) shall contain a positive integer representing the
number o f pixels along axis n of the compression tiles.
|
ZVALn
(optional keywords) These pairs of optional array keywords (where n is an
integer index number starting with 1) supply the name and value,
respectively, of any algorithm-specific parameters that are needed to
compress o r uncompress the image.
|
Modifier and Type | Field and Description |
---|---|
static String |
BLOCKSIZE
The blocksize parameter for the rise algorithm.
|
static String |
BYTEPIX
The number of 8-bit bytes in each original integer pixel value.
|
static String |
COMPRESSED_DATA_COLUMN
Each row of this variable-length column contains the byte st ream that is
generated as a result of compressing the corresponding image tile.
|
static String |
GZIP_COMPRESSED_DATA_COLUMN
When using the quantization method to compress floating-poi nt images
that is described in Section 4, it sometimes may not be possible to
quantize some o f the tiles (e.g., if the range of pixels values is too
large or if most of the pixels have the sam e value and hence the
calculated RMS noise level in the tile is close to zero).
|
static String |
NULL_PIXEL_MASK_COLUMN
The null pixels in integer images are flagged by a reserved BLANK value
and will be preserved if a lossless compression algorithm is used.
|
static String |
SCALE
The integer scale parameter determines the amount of compression.
|
static String |
SMOOTH
At high compressions factors the decompressed image begins to appear
blocky because of the way information is discarded.
|
static String |
UNCOMPRESSED_DATA_COLUMN
Use of this column is no longer recommended, but it may exist i n older
compressed image files that were created before support for the GZIP
COMPRESSED DATA column (describe above) was added to this convention in
May 2011.
|
static String |
ZBLANK_COLUMN
When using the quantization method to compress floating-point images that
is described in Section 4, this column is used to store the integer value
that represents undefined pixels (if any) in the scaled integer pixel
values.
|
static String |
ZCMPTYPE_GZIP_1
Gzip is the compression algorithm used in the free GN U software utility
of the same name.
|
static String |
ZCMPTYPE_GZIP_2
If ZCMPTYPE = ’GZIP 2’ then the bytes in the array of image pixel values
are shuffled in to decreasing order of significance before being
compressed with the gzip algorithm.
|
static String |
ZCMPTYPE_HCOMPRESS_1
Hcompress is an the image compression package written by Richard L.
|
static String |
ZCMPTYPE_PLIO_1
If ZCMPTYPE = ’PLIO 1’ then the IRAF PLIO (Pixel List) algorithm is used
to compress and uncompress the image pixels.
|
static String |
ZCMPTYPE_RICE_1
If ZCMPTYPE = ’RICE 1’ then the Rice algorithm is used to compress and
uncompress the image pixels.
|
static String |
ZCMPTYPE_RICE_ONE
alternative name for 'RICE 1'
|
static String |
ZQUANTIZ_NO_DITHER
This is the simplest option in which no dithering is performed.
|
static String |
ZQUANTIZ_SUBTRACTIVE_DITHER_1
It should be noted that an image that is quantized using this technique
can stil l be unquantized using the simple linear scaling function given
by Eq.
|
static String |
ZQUANTIZ_SUBTRACTIVE_DITHER_2
This dithering algorithm is identical to the SUBTRACTIVE DITHER 1
algorithm described above, ex- cept that any pixels in the floating-point
image that are equa l to 0.0 are represented by the reserved value
-2147483647 in the quantized integer array.
|
static String |
ZSCALE_COLUMN
name of the column containing the quant scale value.
|
static String |
ZZERO_COLUMN
name of the column containing the quant zero value.
|
Modifier and Type | Method and Description |
---|---|
String |
comment() |
IFitsHeader |
getUncompressedKey() |
IFitsHeader.HDU |
hdu() |
String |
key() |
IFitsHeader |
n(int... number) |
IFitsHeader.SOURCE |
status() |
static Compression |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Compression[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
IFitsHeader.VALUE |
valueType() |
public static final Compression ZIMAGE
public static final Compression ZCMPTYPE
public static final Compression ZBITPIX
public static final Compression ZNAXIS
public static final Compression ZNAXISn
public static final Compression ZTILEn
public static final Compression ZNAMEn
public static final Compression ZVALn
public static final Compression ZMASKCMP
public static final Compression ZSIMPLE
public static final Compression ZTENSION
public static final Compression ZEXTEND
@Deprecated public static final Compression ZBLOCKED
public static final Compression ZPCOUNT
public static final Compression ZGCOUNT
public static final Compression ZHECKSUM
public static final Compression ZDATASUM
public static final Compression ZQUANTIZ
public static final Compression ZDITHER0
public static final Compression ZBLANK
public static final String ZQUANTIZ_NO_DITHER
public static final String ZQUANTIZ_SUBTRACTIVE_DITHER_1
public static final String ZQUANTIZ_SUBTRACTIVE_DITHER_2
public static final String ZCMPTYPE_GZIP_1
public static final String ZCMPTYPE_GZIP_2
public static final String ZCMPTYPE_RICE_1
public static final String ZCMPTYPE_PLIO_1
public static final String ZCMPTYPE_HCOMPRESS_1
public static final String ZCMPTYPE_RICE_ONE
public static final String COMPRESSED_DATA_COLUMN
public static final String GZIP_COMPRESSED_DATA_COLUMN
public static final String UNCOMPRESSED_DATA_COLUMN
public static final String ZBLANK_COLUMN
public static final String ZZERO_COLUMN
public static final String ZSCALE_COLUMN
public static final String NULL_PIXEL_MASK_COLUMN
The null pixels in integer images are flagged by a reserved BLANK value and will be preserved if a lossless compression algorithm is used. If the image is compressed with a lossy algorithm, however (e.g., H-Compress with a scale factor greater than 1), then some other technique must be used to identify the null pixels in the image.
The recommended method of recording the null pixels when a lossy compression algorithm is used is to create an integer data mask with the same dimensions as the image tile. Set the null pixels to 1 and all the other pixels to 0, then compress the mask array using a lossless algorithm such as PLIO or GZIP. Store the compressed byte stream in a variable-length array column called ’NULL PIXEL MASK’ in the row corresponding to that image tile. The ZMASKCMP keyword should be used to record the name of the algorithm used to compress the data mask (e.g., RICE 1). The data mask array pixels will be assumed to have the shortest integer datatype that is supported by the compression algorithm (i.e., usually 8-bit bytes).
When uncompressing the image tile, the software must check if the corresponding compressed data mask exists with a length greater than 0, and if so, then uncompress the mask and set the corresponding undefined pixels in the image array to the appropriate value (as given by the BLANK keyword).
public static final String BYTEPIX
public static final String BLOCKSIZE
public static final String SCALE
public static final String SMOOTH
public static Compression[] values()
for (Compression c : Compression.values()) System.out.println(c);
public static Compression valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String comment()
comment
in interface IFitsHeader
public IFitsHeader getUncompressedKey()
public IFitsHeader.HDU hdu()
hdu
in interface IFitsHeader
public String key()
key
in interface IFitsHeader
public IFitsHeader n(int... number)
n
in interface IFitsHeader
public IFitsHeader.SOURCE status()
status
in interface IFitsHeader
public IFitsHeader.VALUE valueType()
valueType
in interface IFitsHeader
Copyright © 1996–2016 nom-tam-fits. All rights reserved.