public class FITSDecoder
extends com.sun.media.jai.codec.ImageDecoderImpl
ImageDecoder
for the FITS file format.Constructor and Description |
---|
FITSDecoder(com.sun.media.jai.codec.SeekableStream input,
com.sun.media.jai.codec.ImageDecodeParam param)
Constructor
|
Modifier and Type | Method and Description |
---|---|
RenderedImage |
decodeAsRenderedImage()
Returns a RenderedImage that contains the decoded contents of the
SeekableStream associated with this ImageDecoder.
|
RenderedImage |
decodeAsRenderedImage(int page)
Returns a RenderedImage that contains the decoded contents of
the SeekableStream associated with this ImageDecoder.
|
int |
getNumPages()
Returns the number of pages (FITS extensions) present in the current stream.
|
public FITSDecoder(com.sun.media.jai.codec.SeekableStream input, com.sun.media.jai.codec.ImageDecodeParam param) throws IOException, FitsException
IOException
FitsException
public RenderedImage decodeAsRenderedImage() throws IOException
decodeAsRenderedImage
in interface com.sun.media.jai.codec.ImageDecoder
decodeAsRenderedImage
in class com.sun.media.jai.codec.ImageDecoderImpl
IOException
public RenderedImage decodeAsRenderedImage(int page) throws IOException
decodeAsRenderedImage
in interface com.sun.media.jai.codec.ImageDecoder
decodeAsRenderedImage
in class com.sun.media.jai.codec.ImageDecoderImpl
IOException
public int getNumPages() throws IOException
Note: The FITS codec defines properties, such as "#num_pages", "#fits_image", and "#preview_image" that give direct access to the FITS HDUs, so that you can tell ahead of time if an HDU contains an image or an ASCII or binary table.
getNumPages
in interface com.sun.media.jai.codec.ImageDecoder
getNumPages
in class com.sun.media.jai.codec.ImageDecoderImpl
IOException
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.