C# Class AForge.Imaging.Formats.FITSCodec

FITS image format decoder.

The FITS (an acronym derived from "Flexible Image Transport System") format is an astronomical image and table format created and supported by NASA. FITS is the most commonly used in astronomy and is designed specifically for scientific data. Different astronomical organizations keep their images acquired using telescopes and other equipment in FITS format.

The class extracts image frames only from the main data section of FITS file. 2D (single frame) and 3D (series of frames) data structures are supported.

During image reading/parsing, its data are scaled using minimum and maximum values of the source image data. FITS tags are not used for this purpose - data are scaled from the [min, max] range found to the range of supported image format ([0, 255] for 8 bpp grayscale or [0, 65535] for 16 bpp grayscale image).

Inheritance: IImageDecoder
Mostra file Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Close decoding of previously opened stream.

The method does not close stream itself, but just closes decoding cleaning all associated data with it.

DecodeFrame ( int frameIndex, ImageInfo &imageInfo ) : Bitmap

Decode specified frame.

DecodeSingleFrame ( Stream stream ) : Bitmap

Decode first frame of FITS image.

Open ( Stream stream ) : int

Open specified stream.

Private Methods

Method Description
ExtractIntegerValue ( string strValue ) : int
ExtractStringValue ( string strValue ) : string
ReadHeader ( Stream stream ) : FITSImageInfo
ReadImageFrame ( Stream stream, FITSImageInfo imageInfo ) : Bitmap

Method Details

Close() public method

Close decoding of previously opened stream.

The method does not close stream itself, but just closes decoding cleaning all associated data with it.

public Close ( ) : void
return void

DecodeFrame() public method

Decode specified frame.
No image stream was opened previously. Stream does not contain frame with specified index. The stream contains invalid (broken) FITS image.
public DecodeFrame ( int frameIndex, ImageInfo &imageInfo ) : Bitmap
frameIndex int Image frame to decode.
imageInfo ImageInfo Receives information about decoded frame.
return System.Drawing.Bitmap

DecodeSingleFrame() public method

Decode first frame of FITS image.
Not a FITS image format. Format of the FITS image is not supported. The stream contains invalid (broken) FITS image.
public DecodeSingleFrame ( Stream stream ) : Bitmap
stream Stream Source stream, which contains encoded image.
return System.Drawing.Bitmap

Open() public method

Open specified stream.
Not a FITS image format. Format of the FITS image is not supported. The stream contains invalid (broken) FITS image.
public Open ( Stream stream ) : int
stream Stream Stream to open.
return int