C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackKonv | Conversion context. |
cmpack_konv_init | Make new conversion context. |
cmpack_konv_set_console | Attach console to the context. |
cmpack_konv_set_bitpix | Set output data format. |
cmpack_konv_get_bitpix | Get output data format. |
cmpack_konv_set_trafo | Set image flip flags. |
cmpack_konv_get_trafo | Get image flip flags. |
cmpack_konv_set_border | Set image border size. |
cmpack_konv_get_border | Get image flip flags. |
cmpack_konv | Convert a specified file to FITS format. |
Set of functions defined in this module allows user to convert the CCD frames to FITS format.
Conversion context.
typedef struct _CmpackKonv CmpackKonv
This private data structure holds the configuration parameters for CCD-frame conversion.
Make new conversion context.
CmpackKonv * cmpack_konv_init (void)
The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.
pointer to context or zero on failure
Attach console to the context.
void cmpack_konv_set_console (CmpackKonv * ctx, CmpackConsole * con)
Increment console's reference counter. Only one console can be attached to a single context. If another console is attached, by calling this function dettaches it. Set console to NULL to dettach the current console.
ctx | [in] | conversion context |
con | [in] | console context |
Set output data format.
void cmpack_konv_set_bitpix (CmpackKonv * file, CmpackBitpix bitpix)
file | [in] | conversion context |
bitpix | [in] | output data format |
Get output data format.
CmpackBitpix cmpack_konv_get_bitpix (CmpackKonv * file)
file | [in] | conversion context |
output data format
Set image flip flags.
void cmpack_konv_set_trafo (CmpackKonv * file, int bitmask)
file | [in] | conversion context |
bitmask | [in] | bitmask of image trasformation flags |
Get image flip flags.
int cmpack_konv_get_trafo (CmpackKonv * file)
file | [in] | conversion context |
bitmask of image transformation flags
Set image border size.
void cmpack_konv_set_border (CmpackKonv * file, const CmpackBorder * border)
If you set the border to nonzero size, the conversion function will set the pixels which belongs to the border area to zero. You can use this feature to clear an unusable part of a frame.
file | [in] | conversion context |
border | [in] | border size in pixels |
Get image flip flags.
void cmpack_konv_get_border (CmpackKonv * file, CmpackBorder * border)
file | [in] | conversion context |
border | [out] | border size in pixels |
Convert a specified file to FITS format.
int cmpack_konv (CmpackKonv * lc, CmpackCcdFile * infile, CmpackCcdFile * outfile)
This function detects the format of specified source file, read its header and image data and writes it to the output file.
lc | [in] | conversion context |
infile | [in] | source file context |
outfile | [in] | output file context |
zero on success or error code on failure