Exported functions for SIL label handling.
More...
|
cvbval_t | SilCompareLabels (TSILLABEL LabelA, TSILLABEL LabelB) |
| Compares two SIL label objects for equality.
|
|
TSILLABEL | SilCreateStringLabel (const char *szString) |
| Creates a SIL string label object using the input string.
|
|
TSILLABEL | SilCreateStringLabelW (const wchar_t *szString) |
| Creates a SIL string label object using the input string.
|
|
TSILLABEL | SilCreateVectorLabel (const float *pData, size_t nDimension) |
| Creates a SIL string label object using the input string.
|
|
cvbres_t | SilGetExcludedFlag (TSILLABEL Label, cvbbool_t &Excluded) |
| Check whether the data associated with a label belongs to the set of excluded classes.
|
|
cvbres_t | SilGetFloatVectorLabel (TSILLABEL Handle, float *pTarget, size_t &TargetSize) |
| Retrieve the float vector from a TSILLABEL object.
|
|
cvbres_t | SilGetStringLabel (TSILLABEL Handle, char *szTarget, size_t &TargetSize) |
| Retrieves the string label in the TSILLABEL object.
|
|
cvbres_t | SilGetStringLabelW (TSILLABEL Handle, wchar_t *szTarget, size_t &TargetSize) |
| Retrieves the string label in the TSILLABEL object.
|
|
cvbres_t | SilSetExcludedFlag (TSILLABEL Label, cvbbool_t Exclude) |
| Define whether the data associated with a label belongs to the set of excluded classes.
|
|
cvbbool_t | SilVerifyLabelCompatibility (TSILLABEL Label, TSILLABELTYPE LabelType) |
| Verifies if a label is compatible with a label type descriptor.
|
|
Exported functions for SIL label handling.
- Author
- VGi
- Since
- 1.0.0 First version. (VGi, 21.04.2009)
◆ pfTransformSilLabel
typedef cvbbool_t(* pfTransformSilLabel) (void *pPrivate, TSILLABEL LabelIn, TSILLABEL &LabelOut) |
SIL label transformation callback.
- Parameters
-
[in] | pPrivate | Private data pointer. |
[in] | LabelIn | Label to be transformed. |
[out] | LabelOut | Transformed label. |
- Returns
TRUE
if the transformation succeeded, FALSE
otherwise (FALSE
will usually stop the iteration).
◆ TSilLabelType
The possible types of data labels for the SIL.
Enumerator |
---|
SLT_Undefined | Indicates cases where the state is undefined.
|
SLT_String | The labels in the SIL are strings.
|
SLT_Float | The labels in the SIL are float vectors.
|
◆ SilCompareLabels()
Compares two SIL label objects for equality.
- Parameters
-
[in] | LabelA | Label to be compared. |
[in] | LabelB | Label to be compared. |
- Returns
- 0: the two objects match
- 1: rhs describes a data type other than *this
- -1: rhs describes a vector of different length
◆ SilCreateStringLabel()
TSILLABEL SilCreateStringLabel |
( |
const char * | szString | ) |
|
◆ SilCreateStringLabelW()
TSILLABEL SilCreateStringLabelW |
( |
const wchar_t * | szString | ) |
|
◆ SilCreateVectorLabel()
TSILLABEL SilCreateVectorLabel |
( |
const float * | pData, |
|
|
size_t | nDimension ) |
◆ SilGetExcludedFlag()
cvbres_t SilGetExcludedFlag |
( |
TSILLABEL | Label, |
|
|
cvbbool_t & | Excluded ) |
Check whether the data associated with a label belongs to the set of excluded classes.
- Parameters
-
[in] | Label | Label on which to check. |
[out] | Excluded | current exclusion status |
- Returns
HRESULT
(<0: error)
◆ SilGetFloatVectorLabel()
cvbres_t SilGetFloatVectorLabel |
( |
TSILLABEL | Handle, |
|
|
float * | pTarget, |
|
|
size_t & | TargetSize ) |
Retrieve the float vector from a TSILLABEL object.
Copies the vector label in the TSILLABEL object to the location indicated by pTarget
. pTarget
must be big enough to hold the whole label vector (verify with SilGetFloatVectorLabelDim if necessary).
If the input LabelType
does not refer to a float vector, an error will be returned.
- Parameters
-
[in] | Handle | Input label object Handle. |
[in] | pTarget | Buffer to which the label vector should be copied. |
[in,out] | TargetSize | Input: size of the buffer pointed to by szTarget, output: number of floats copied.
buffer size should be given in number of elements, not in bytes! |
- Returns
- HRESULT (<0: failure)
◆ SilGetStringLabel()
cvbres_t SilGetStringLabel |
( |
TSILLABEL | Handle, |
|
|
char * | szTarget, |
|
|
size_t & | TargetSize ) |
Retrieves the string label in the TSILLABEL object.
Copies the string's characters to the location indicated by szTarget
. If szTarget
== NULL
, only the length of the string will be written into the variable TargetSize
.
If the Handle
does not refer to a string label, an error will be returned.
- Parameters
-
[in] | Handle | Input label object Handle. |
[in] | szTarget | Buffer to which the label string should be copied. |
[in,out] | TargetSize | Input: size of the buffer pointed to by szTarget, output: number of bytes copied (incl. terminating 0). |
- Returns
- HRESULT (<0: failure)
◆ SilGetStringLabelW()
cvbres_t SilGetStringLabelW |
( |
TSILLABEL | Handle, |
|
|
wchar_t * | szTarget, |
|
|
size_t & | TargetSize ) |
Retrieves the string label in the TSILLABEL object.
Copies the string's characters to the location indicated by szTarget
. If szTarget
== NULL
, only the length of the string will be written into the variable TargetSize
.
If the Handle
does not refer to a string label, an error will be returned.
- Parameters
-
[in] | Handle | Input label object Handle. |
[in] | szTarget | Buffer to which the label string should be copied. |
[in,out] | TargetSize | Input: size of the buffer pointed to by szTarget, output: number of bytes copied (incl. terminating 0). |
- Returns
- HRESULT (<0: failure)
◆ SilSetExcludedFlag()
cvbres_t SilSetExcludedFlag |
( |
TSILLABEL | Label, |
|
|
cvbbool_t | Exclude ) |
Define whether the data associated with a label belongs to the set of excluded classes.
- Parameters
-
[in] | Label | Label on which to define. |
[in] | Exclude | Exclusion status. |
- Returns
HRESULT
(<0: error)
◆ SilVerifyLabelCompatibility()
Verifies if a label is compatible with a label type descriptor.
- Parameters
-
[in] | Label | Label object to be verified. |
[in] | LabelType | Label type descriptor object. |
- Returns
- TRUE if
Label
is compatible with LabelType
, else FALSE.