Package nom.tam.fits

Class ImageHDU

    • Field Detail

      • LOG

        private static final java.util.logging.Logger LOG
    • Constructor Detail

      • ImageHDU

        public ImageHDU​(Header h,
                        ImageData d)
                 throws FitsException
        Build an image HDU using the supplied data.
        Parameters:
        h - the header for the image.
        d - the data used in the image.
        Throws:
        FitsException - if there was a problem with the data.
    • Method Detail

      • encapsulate

        public static ImageData encapsulate​(java.lang.Object o)
                                     throws FitsException
        Parameters:
        o - object to encapsulate
        Returns:
        Encapsulate an object as an ImageHDU.
        Throws:
        FitsException - if the operation failed
      • isData

        public static boolean isData​(java.lang.Object o)
        Parameters:
        o - The Object being tested.
        Returns:
        is this object can be described as a FITS image.
      • isHeader

        public static boolean isHeader​(Header hdr)
        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.
      • manufactureHeader

        public static Header manufactureHeader​(Data d)
                                        throws FitsException
        Parameters:
        d - The image to be described.
        Returns:
        Create a header that describes the given image data.
        Throws:
        FitsException - if the object does not contain valid image data.
      • canBePrimary

        protected boolean canBePrimary()
        Indicate that Images can appear at the beginning of a FITS dataset
        Overrides:
        canBePrimary in class BasicHDU<ImageData>
        Returns:
        Indicate whether HDU can be primary HDU. This method must be overriden in HDU types which can appear at the beginning of a FITS file.
      • info

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

        protected void setPrimaryHDU​(boolean status)
        Change the Image from/to primary
        Overrides:
        setPrimaryHDU in class BasicHDU<ImageData>
        Parameters:
        status - value to set