Class ImageHDU
- All Implemented Interfaces:
FitsElement
- Direct Known Subclasses:
NullDataHDU
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:
-
Field Summary
Fields inherited from class BasicHDU
BITPIX_BYTE, BITPIX_DOUBLE, BITPIX_FLOAT, BITPIX_INT, BITPIX_LONG, BITPIX_SHORTModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.UseBitpix.VALUE_FOR_DOUBLEinstead.static final intDeprecated.UseBitpix.VALUE_FOR_FLOATinstead.static final intDeprecated.UseBitpix.VALUE_FOR_INTinstead.static final intDeprecated.UseBitpix.VALUE_FOR_LONGinstead.static final intDeprecated.UseBitpix.VALUE_FOR_SHORTinstead. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageDataDeprecated.(for internal use) UseImageData.from(Object)instead.longReturns the integer value that signifies blank (missing ornull) data in an integer image.doubleReturns the floating-point increment between adjacent integer values in the image.getBUnit()Returns the name of the physical unit in which images are represented.doublegetBZero()Returns the floating-point value that corresponds to an 0 integer value in the image.getTiler()Returns the class that can be used to divide this image into tiles that may be processed separately (and in parallel).voidinfo(PrintStream stream) Print out some information about this HDU.static booleanDeprecated.(for internal use) Will reduce visibility in the futurestatic booleanDeprecated.(for internal use) Will reduce visibility in the futurestatic ImageDatamanufactureData(Header hdr) Deprecated.(for internal use) Will reduce visibility in the futurestatic HeaderDeprecated.(for internal use) Will reduce visibility in the futureMethods inherited from class BasicHDU
addValue, addValue, addValue, addValue, addValue, addValue, addValue, addValue, calcChecksum, card, getAuthor, getAxes, getBitpix, getBitPix, getCreationDate, getData, getDummyHDU, getEpoch, getEquinox, getFileOffset, getGroupCount, getHeader, getInstrument, getKernel, getMaximumValue, getMinimumValue, getObject, getObservationDate, getObserver, getOrigin, getParameterCount, getReference, getSize, getStoredChecksum, getStoredDatasum, getTelescope, getTrimmedString, getTrimmedString, read, reset, rewrite, rewriteable, setChecksum, verifyDataIntegrity, verifyIntegrity, writeModifier and TypeMethodDescriptionvoidAdd information to the header.voidAdd information to the header.voidAdd information to the header.voidAdd information to the header.voidaddValue(IFitsHeader key, boolean val) Add information to the header.voidaddValue(IFitsHeader key, double val) Add information to the header.voidaddValue(IFitsHeader key, int val) Add information to the header.voidaddValue(IFitsHeader key, String val) Add information to the header.longDeprecated.UseBasicHDU.verifyIntegrity()instead when appropriate.card(IFitsHeader key) Returns a header card builder for filling the header cards using the builder pattern.Return the name of the person who compiled the information in the data associated with this header.int[]getAxes()In FITS files the index represented by NAXIS1 is the index that changes most rapidly.Return the Bitpix enum type for this HDU.final intDeprecated.(for internal use) Will reduce visibility or remove entirely in the future.Get the FITS file creation date as aDateobject.getData()Returns the data component of this HDU.static NullDataHDUDeprecated.UseNullDataHDUinstead.doublegetEpoch()Deprecated.useBasicHDU.getEquinox()insteaddoubleGet the equinox in years for the celestial coordinate system in which positions given in either the header or data are expressed.longReturns the byte offset at which this element starts ina file.intDeprecated.Should not be exposed outside ofRandomGroupsHDU-- will reduce visibility in the future/Returns the FITS header component of this HDUGet the name of the instrument which was used to acquire the data in this FITS file.final ObjectReturns the underlying Java object (usually an array of some type) that stores the data internally.doubleReturn the minimum valid value in the array.doubleReturn the minimum valid value in the array.Get the name of the observed object in this FITS file.Get the FITS file observation date as aDateobject.Get the name of the person who acquired the data in this FITS file.Get the name of the organization which created this FITS file.intDeprecated.Should not be exposed outside ofRandomGroupsHDU-- will reduce visibility in the future.Return the citation of a reference where the data associated with this header are published.longgetSize()Returns the size of this elements in the FITS representation.longDeprecated.Not very useful, since it has no meaning other than ensuring that the checksum of the HDU yields(int) -1(that is0xffffffff) after including this value for the CHECKSUM keyword in the header.longReturns the FITS checksum for the HDU's data that is stored in the header of this HDU under theDATASUMkeyword.Get the name of the telescope which was used to acquire the data in this FITS file.getTrimmedString(String keyword) Deprecated.(for internal use) Will reduced visibility in the future.getTrimmedString(IFitsHeader keyword) Deprecated.(for internal use) Will reduced visibility in the future.voidread(ArrayDataInput stream) Read a FITS element from the input, starting at the current position.booleanreset()Reset the input stream to point to the beginning of this elementvoidrewrite()Rewrite the contents of the element in place.booleanChecks if we can write this element back to its source.voidComputes the checksums for this HDU and stores theCHECKSUMandDATASUMvalues in the header.booleanChecks that the HDUs data checksum is correct.booleanChecks the HDU's integrity, using the recorded CHECKSUM and/or DATASUM keywords if present.voidwrite(ArrayDataOutput stream) Writes the contents of the element to a data sink, adding padding as necessary if the element (such as a header or data segment) is expected to complete the FITS block of 2880 bytes.
-
Constructor Details
-
ImageHDU
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) UseImageData.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 exceptionIllegalArgumentException- if the data is not a regular primitive numerical array suitable for an image.
-
isData
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.(for internal use) Will reduce visibility in the futureCheck that this HDU has a valid header for this type.- Parameters:
hdr- header to check- Returns:
trueif this HDU has a valid header.
-
manufactureData
Deprecated.(for internal use) Will reduce visibility in the futurePrepares 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.(for internal use) Will reduce visibility in the futurePrepares 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
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
Description copied from class:BasicHDUPrint out some information about this HDU. -
getBUnit
-
getBlankValue
Returns the integer value that signifies blank (missing ornull) data in an integer image.- Overrides:
getBlankValuein classBasicHDU<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. -
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.
-
Bitpix.VALUE_FOR_BYTEinstead.