C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackBiasCorr | Bias-frame correction context. |
cmpack_bias_init | Make new bias-frame correction context. |
cmpack_bias_set_console | Attach console to the context. |
cmpack_bias_set_border | Set image border size. |
cmpack_bias_get_border | Get image flip flags. |
cmpack_bias_rbias | Set correction frame. |
cmpack_bias | Execute bias-frame correction. |
cmpack_bias_ex | Execute bias-frame correction. |
Set of functions defined in this module allows user to apply bias-frame correction to CCD frames.
Bias-frame correction context.
typedef struct _CmpackBiasCorr CmpackBiasCorr
This private data structure holds the parameter for bias-frame correction as well as the bias frame itself.
Make new bias-frame correction context.
CmpackBiasCorr * cmpack_bias_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 the new bias correction context context or zero on failure
Attach console to the context.
void cmpack_bias_set_console (CmpackBiasCorr * 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] | bias correction context |
con | [in] | console context |
Set image border size.
void cmpack_bias_set_border (CmpackBiasCorr * ctx, 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.
ctx | [in] | bias correction context |
border | [in] | border size in pixels |
Get image flip flags.
void cmpack_bias_get_border (CmpackBiasCorr * ctx, CmpackBorder * border)
ctx | [in] | bias correction context |
border | [out] | border size in pixels |
Set correction frame.
int cmpack_bias_rbias (CmpackBiasCorr * ctx, CmpackCcdFile * biasfile)
The function reads the correction frame from the given frame context. The internal copy of the image data is made, no reference to the frame is held, so you can free it when this function has returned.
ctx | [in] | bias correction context |
biasfile | [in] | bias frame context |
zero on success or error code on failure
Execute bias-frame correction.
int cmpack_bias (CmpackBiasCorr * ctx, CmpackCcdFile * file)
The function reads image data from the file context, performs the bias correction and stores the output to the same context.
ctx | [in] | bias correction context |
file | [inout] | CCD frame context |
zero on success or error code on failure
Execute bias-frame correction.
int cmpack_bias_ex (CmpackBiasCorr * ctx, CmpackCcdFile * infile, CmpackCcdFile * outfile)
The function reads image data from the infile context, performs the bias correction and stores the output image to the outfile context.
ctx | [in] | bias-frame correction context |
infile | [in] | input frame context |
outfile | [in] | output frame context |
zero on success or error code on failure