Class CompressHeaderParameter<OPTION>

java.lang.Object
nom.tam.fits.compression.provider.param.base.CompressParameter<OPTION>
nom.tam.fits.compression.provider.param.base.CompressHeaderParameter<OPTION>
Type Parameters:
OPTION - The generic type of the compression option for which this parameter is used.
All Implemented Interfaces:
Cloneable, ICompressHeaderParameter, ICompressParameter
Direct Known Subclasses:
HCompressScaleParameter, HCompressSmoothParameter, RiceBlockSizeParameter, RiceBytePixParameter

public abstract class CompressHeaderParameter<OPTION> extends CompressParameter<OPTION> implements ICompressHeaderParameter
(for internal use) Visibility may be reduced to protected.
  • Constructor Details

    • CompressHeaderParameter

      protected CompressHeaderParameter(String name, OPTION option)
  • Method Details

    • findZVal

      public HeaderCard findZVal(IHeaderAccess header)
      Deprecated.
      Use findZVal(Header) instead.
    • nextFreeZVal

      public int nextFreeZVal(IHeaderAccess header)
      Deprecated.
    • findZVal

      public HeaderCard findZVal(Header header) throws HeaderCardException
      Finds the ZVAL header value corresponding to this compression parameter
      Parameters:
      header - The compressed HDU header
      Returns:
      the header card containing the ZVAL for this compression parameter
      Throws:
      HeaderCardException - if there was an issue accessing the header
    • nextFreeZVal

      public int nextFreeZVal(Header header) throws HeaderCardException

      Finds the next available (or previously used) the ZNAME / ZVAL index in the header that we can use to store this parameter.

      Unfortunately, the way it was implemented, using this repeatedly on the same header and compression parameter keeps adding new entries, rather than updating the existing one. As of 1.19, the behavior is changed to update existing values -- resulting in a more predictable behavior.

      Parameters:
      header - The compressed HDU header
      Returns:
      the ZNAME / ZVAL index we might use to store a new parameter
      Throws:
      HeaderCardException - if there was an issue accessing the header