Package nom.tam.fits

Class ImageHDU

All Implemented Interfaces:
FitsElement
Direct Known Subclasses:
NullDataHDU

public class ImageHDU extends BasicHDU<ImageData>
Header/data unit for images. Image HDUs are suitable for storing monolithic regular numerical arrays in 1 to 255 dimensions, such as a double[], float[][], or short[][][]. ((FITS supports up to 999 dimensions, but Java support maxes at at 255 -- however it's unlikely you'll find this to be a serious limitation.)
See Also:
  • Constructor Details

    • ImageHDU

      public ImageHDU(Header h, ImageData d)
      Deprecated.
      (for internal use) Its visibility should be reduced to package level in the future.
      Build an image HDU using the supplied data.
      Parameters:
      h - the header for the image.
      d - the data used in the image.
  • Method Details

    • encapsulate

      @Deprecated public static ImageData encapsulate(Object o) throws IllegalArgumentException, FitsException
      Deprecated.
      (for internal use) Use ImageData.from(Object) instead. Will reduce visibility in the future
      Parameters:
      o - object to encapsulate
      Returns:
      Encapsulate an object as an ImageHDU.
      Throws:
      FitsException - does not actually throw this exception
      IllegalArgumentException - if the data is not a regular primitive numerical array suitable for an image.
    • isData

      @Deprecated public static boolean isData(Object o)
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Parameters:
      o - The Object being tested.
      Returns:
      is this object can be described as a FITS image.
    • isHeader

      @Deprecated public static boolean isHeader(Header hdr)
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Check that this HDU has a valid header for this type.
      Parameters:
      hdr - header to check
      Returns:
      true if this HDU has a valid header.
    • manufactureData

      @Deprecated public static ImageData manufactureData(Header hdr) throws FitsException
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Prepares a data object into which the actual data can be read from an input subsequently or at a later time.
      Parameters:
      hdr - The FITS header that describes the data
      Returns:
      A data object that support reading content from a stream.
      Throws:
      FitsException - if the data could not be prepared to prescriotion.
    • manufactureHeader

      @Deprecated public static Header manufactureHeader(Data d) throws FitsException
      Deprecated.
      (for internal use) Will reduce visibility in the future
      Prepares a data object into which the actual data can be read from an input subsequently or at a later time.
      Parameters:
      d - The FITS data content of this HDU
      Returns:
      A data object that support reading content from a stream.
      Throws:
      FitsException - if the data could not be prepared to prescriotion.
    • getTiler

      public StandardImageTiler getTiler()
      Returns the class that can be used to divide this image into tiles that may be processed separately (and in parallel).
      Returns:
      image tiler for this image instance.
      See Also:
    • info

      public void info(PrintStream stream)
      Description copied from class: BasicHDU
      Print out some information about this HDU.
      Specified by:
      info in class BasicHDU<ImageData>
      Parameters:
      stream - the printstream to write the info on
    • getBUnit

      public String getBUnit()
      Returns the name of the physical unit in which images are represented.
      Overrides:
      getBUnit in class BasicHDU<ImageData>
      Returns:
      the standard name of the physical unit in which the image is expressed, e.g. "Jy beam^{-1}".
    • getBlankValue

      public long getBlankValue() throws FitsException
      Returns the integer value that signifies blank (missing or null) data in an integer image.
      Overrides:
      getBlankValue in class BasicHDU<ImageData>
      Returns:
      the integer value used for identifying blank / missing data in integer images.
      Throws:
      FitsException - if the header does not specify a blanking value or if it is not appropriate for the type of imge (that is not an integer type image)
    • getBScale

      public double getBScale()
      Returns the floating-point increment between adjacent integer values in the image. Strictly speaking, only integer-type images should define a quantization scaling, but there is no harm in having this value in floating-point images also -- which may be interpreted as a hint for quantization, perhaps.
      Overrides:
      getBScale in class BasicHDU<ImageData>
      Returns:
      the floating-point quantum that corresponds to the increment of 1 in the integer data representation.
      See Also:
    • getBZero

      public double getBZero()
      Returns the floating-point value that corresponds to an 0 integer value in the image. Strictly speaking, only integer-type images should define a quantization offset, but there is no harm in having this value in floating-point images also -- which may be interpreted as a hint for quantization, perhaps.
      Overrides:
      getBZero in class BasicHDU<ImageData>
      Returns:
      the floating point value that correspond to the integer 0 in the image data.
      See Also: