Defines | |
#define | CPL_FRAME_GROUP_CALIB_ID "CALIB" |
Frame group tag for calibration data. | |
#define | CPL_FRAME_GROUP_PRODUCT_ID "PRODUCT" |
Frame group tag for processed data. | |
#define | CPL_FRAME_GROUP_RAW_ID "RAW" |
Frame group tag for unprocessed data. | |
Typedefs | |
typedef _cpl_frame_ | cpl_frame |
The frame data type. | |
typedef enum _cpl_frame_group_ | cpl_frame_group |
The frame group data type. | |
typedef enum _cpl_frame_level_ | cpl_frame_level |
The frame level data type. | |
typedef enum _cpl_frame_type_ | cpl_frame_type |
The frame type data type. | |
Enumerations | |
enum | _cpl_frame_group_ { CPL_FRAME_GROUP_NONE, CPL_FRAME_GROUP_RAW, CPL_FRAME_GROUP_CALIB, CPL_FRAME_GROUP_PRODUCT } |
Supported frame groups. More... | |
enum | _cpl_frame_level_ { CPL_FRAME_LEVEL_NONE, CPL_FRAME_LEVEL_TEMPORARY, CPL_FRAME_LEVEL_INTERMEDIATE, CPL_FRAME_LEVEL_FINAL } |
Supported frame processing levels. More... | |
enum | _cpl_frame_type_ { CPL_FRAME_TYPE_NONE, CPL_FRAME_TYPE_IMAGE, CPL_FRAME_TYPE_MATRIX, CPL_FRAME_TYPE_TABLE, CPL_FRAME_TYPE_PAF, CPL_FRAME_TYPE_ANY } |
Supported frame types. More... | |
Functions | |
void | cpl_frame_delete (cpl_frame *self) |
Destroy a frame. | |
void | cpl_frame_dump (const cpl_frame *frame, FILE *stream) |
Dump the frame debugging information to the given stream. | |
cpl_frame * | cpl_frame_duplicate (const cpl_frame *other) |
Create a copy of a frame. | |
const char * | cpl_frame_get_filename (const cpl_frame *self) |
Get the file name to which a frame refers. | |
cpl_frame_group | cpl_frame_get_group (const cpl_frame *self) |
Get the current group of a frame. | |
cpl_frame_level | cpl_frame_get_level (const cpl_frame *self) |
Get the current level of a frame. | |
int | cpl_frame_get_nextensions (const cpl_frame *self) |
Get the number of extensions of this frame. | |
const char * | cpl_frame_get_tag (const cpl_frame *self) |
Get the category tag of a frame. | |
cpl_frame_type | cpl_frame_get_type (const cpl_frame *self) |
Get the type of a frame. | |
cpl_frame * | cpl_frame_new (void) |
Create a new, empty frame. | |
cpl_error_code | cpl_frame_set_filename (cpl_frame *self, const char *filename) |
Set the file name to which a frame refers. | |
cpl_error_code | cpl_frame_set_group (cpl_frame *self, cpl_frame_group group) |
Set the group attribute of a frame. | |
cpl_error_code | cpl_frame_set_level (cpl_frame *self, cpl_frame_level level) |
Set the level attribute of a frame. | |
cpl_error_code | cpl_frame_set_tag (cpl_frame *self, const char *tag) |
Set a frame's category tag. | |
cpl_error_code | cpl_frame_set_type (cpl_frame *self, cpl_frame_type type) |
Set the type of a frame. |
cpl_frame
type. A frame is a container for descriptive attributes related to a data file. The attributes are related to a data file through the file name member of the frame type. Among the attributes which may be assigned to a data file is an attribute identifying the type of the data stored in the file (image or table data), a classification tag indicating the kind of data the file contains and an attribute denoting to which group the data file belongs (raw, processed or calibration file). For processed data a processing level indicates whether the product is an temporary, intermediate or final product.
#include <cpl_frame.h>
#define CPL_FRAME_GROUP_CALIB_ID "CALIB" |
Frame group tag for calibration data.
#define CPL_FRAME_GROUP_PRODUCT_ID "PRODUCT" |
Frame group tag for processed data.
#define CPL_FRAME_GROUP_RAW_ID "RAW" |
Frame group tag for unprocessed data.
typedef struct _cpl_frame_ cpl_frame |
The frame data type.
typedef enum _cpl_frame_group_ cpl_frame_group |
The frame group data type.
typedef enum _cpl_frame_level_ cpl_frame_level |
The frame level data type.
typedef enum _cpl_frame_type_ cpl_frame_type |
The frame type data type.
enum _cpl_frame_group_ |
Supported frame groups.
Defines the possible values for the frame's group attribute.
enum _cpl_frame_level_ |
Supported frame processing levels.
enum _cpl_frame_type_ |
Supported frame types.
Defines the possible values for the frame's type attribute.
void cpl_frame_delete | ( | cpl_frame * | self | ) |
Destroy a frame.
self | A frame. |
NULL
, nothing is done, and no error is set.
void cpl_frame_dump | ( | const cpl_frame * | frame, | |
FILE * | stream | |||
) |
Dump the frame debugging information to the given stream.
frame | The frame. | |
stream | The output stream to use. |
NULL
the function writes to the standard output. If frame is NULL
the function does nothing.
Create a copy of a frame.
other | The frame to copy. |
NULL
and sets an appropriate error code.CPL_ERROR_NULL_INPUT | The parameter other is a NULL pointer. |
The function creates a clone of the input frame other. All members of the input frame are copied.
const char* cpl_frame_get_filename | ( | const cpl_frame * | self | ) |
Get the file name to which a frame refers.
self | A frame. |
NULL
if a file name has not been set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The frame self is not associated to a file. |
The function returns the read-only name of a file associated to self. A file is associated to self by calling cpl_frame_set_filename() for self. If self is not associated to a file this function returns NULL
.
cpl_frame_group cpl_frame_get_group | ( | const cpl_frame * | self | ) |
Get the current group of a frame.
self | A frame. |
CPL_FRAME_GROUP_NONE
if an error occurs and sets an appropriate error code.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the group attribute of the frame self.
cpl_frame_level cpl_frame_get_level | ( | const cpl_frame * | self | ) |
Get the current level of a frame.
self | A frame. |
CPL_FRAME_LEVEL_NONE
if an error occurs and sets an appropriate error code.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the level attribute of the frame self.
int cpl_frame_get_nextensions | ( | const cpl_frame * | self | ) |
Get the number of extensions of this frame.
self | A frame. |
CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
CPL_ERROR_DATA_NOT_FOUND | The frame self is not associated to a file. |
const char* cpl_frame_get_tag | ( | const cpl_frame * | self | ) |
Get the category tag of a frame.
self | A frame. |
NULL
if the tag is not set. The function returns NULL
if an error occurs and an appropriate error code is set.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the read-only frame's category tag. If a tag has not yet been set a NULL
pointer is returned.
cpl_frame_type cpl_frame_get_type | ( | const cpl_frame * | self | ) |
Get the type of a frame.
self | A frame. |
CPL_FRAME_TYPE_NONE
if an error occurs and sets an appropriate error code.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function returns the type of the data object to which it currently refers.
cpl_frame* cpl_frame_new | ( | void | ) |
Create a new, empty frame.
CPL_FRAME_TYPE_NONE
, CPL_FRAME_GROUP_NONE
, and CPL_FRAME_LEVEL_NONE
, resepctively.
cpl_error_code cpl_frame_set_filename | ( | cpl_frame * | self, | |
const char * | filename | |||
) |
Set the file name to which a frame refers.
self | A frame. | |
filename | The new file name. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or filename is a NULL pointer. |
The function sets the name of the file, to which the frame self refers. Any file name which was previously set by a call to this function is replaced. If no file name is present yet it is created and initialised to filename.
cpl_error_code cpl_frame_set_group | ( | cpl_frame * | self, | |
cpl_frame_group | group | |||
) |
Set the group attribute of a frame.
self | A frame. | |
group | New group attribute. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function sets the group attribute of the frame self to group.
cpl_error_code cpl_frame_set_level | ( | cpl_frame * | self, | |
cpl_frame_level | level | |||
) |
Set the level attribute of a frame.
self | A frame. | |
level | New level attribute. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function sets the level attribute of the frame self to level.
cpl_error_code cpl_frame_set_tag | ( | cpl_frame * | self, | |
const char * | tag | |||
) |
Set a frame's category tag.
self | A frame. | |
tag | The new category tag. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self or tag is a NULL pointer. |
The function sets the category tag of self, replacing any previously set tag. If the frame does not yet have a tag is is created and initialised to tag.
cpl_error_code cpl_frame_set_type | ( | cpl_frame * | self, | |
cpl_frame_type | type | |||
) |
Set the type of a frame.
self | A frame. | |
type | New frame type. |
CPL_ERROR_NONE
on success or a CPL error code otherwise.CPL_ERROR_NULL_INPUT | The parameter self is a NULL pointer. |
The function sets the type of the frame self to type.