C# Класс 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).

Наследование: IImageDecoder
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ExtractIntegerValue ( string strValue ) : int
ExtractStringValue ( string strValue ) : string
ReadHeader ( Stream stream ) : FITSImageInfo
ReadImageFrame ( Stream stream, FITSImageInfo imageInfo ) : Bitmap

Описание методов

Close() публичный Метод

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
Результат void

DecodeFrame() публичный Метод

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.
Результат System.Drawing.Bitmap

DecodeSingleFrame() публичный Метод

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.
Результат System.Drawing.Bitmap

Open() публичный Метод

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.
Результат int