Header to include: imodel.h
Ilabel *imodLabelNew()
void imodLabelDelete(Ilabel *label)
Ilabel *imodLabelDup(Ilabel *label)
int imodLabelName(Ilabel *label, const char *val)
void imodLabelItemAdd(Ilabel *label, const char *val, int index)
void imodLabelItemMove(Ilabel *label, int to_index, int from_index)
void imodLabelItemDelete(Ilabel *label, int index)
const char *imodLabelNameGet(Ilabel *label)
const char *imodLabelItemGet(Ilabel *label, int index)
void imodLabelPrint(Ilabel *lab, FILE *fout)
int imodLabelWrite(Ilabel *lab, b3dUInt32 tag, FILE *fout)
Ilabel *imodLabelRead(FILE *fin, int *err)
Create a new empty Ilabel structure. Returns NULL for error.
Deleteslabel, freeing all data.
Duplicates label and returns the copy; returns NULL if error or if no existing label, i.e. label is NULL
Give label the title in val, i.e., set the name element of the Ilabel structure. Returns 1 for label or val NULL, or 2 for memory allocation error.
Adds a label item to label with the name given by val and the value given by index. Replaces an existing label item with the same value of index.
Changes the index to to_index for any item in label that has index from_index.
Deletes the first label item in label that has index value equal to index.
Returns a pointer to the name element of label. Returns NULL if the label or the name is NULL.
Returns a pointer to the name element of the first label item in label that has the index value index. Returns NULL if none is found or the label is NULL or has no items.
Prints the contour label lab and its items to file fout.
Writes a label lab with the chunk ID in tag to the model file fout.
Reads a label chunk from the model file fin. Returns NULL and sets err to IMOD_ERROR_MEMORY for memory errors.
typedef struct { b3dByte *name; /* The name string for this item */ b3dInt32 len; /* Length of name string */ b3dInt32 index; /* A value associated with this label */ }IlabelItem; typedef struct { b3dByte *name; /* The name string for the label */ b3dInt32 len; /* Length of name */ b3dInt32 nl; /* Number of sub-label items */ IlabelItem *label; /* Array of items */ }Ilabel;