Sample Image List (Sil.dll) 14.1
SIL Label Access

Exported functions for SIL label handling. More...

Typedefs

typedef cvbbool_t(* pfTransformSilLabel) (void *pPrivate, TSILLABEL LabelIn, TSILLABEL &LabelOut)
 
typedef void * TSILLABEL
 

Enumerations

enum  TSilLabelType { SLT_Undefined = -1 , SLT_String = 0 , SLT_Float }
 

Functions

cvbval_t SilCompareLabels (TSILLABEL LabelA, TSILLABEL LabelB)
 Compares two SIL label objects for equality. More...
 
TSILLABEL SilCreateStringLabel (const char *szString)
 Creates a SIL string label object using the input string.
More...
 
TSILLABEL SilCreateStringLabelW (const wchar_t *szString)
 Creates a SIL string label object using the input string.
More...
 
TSILLABEL SilCreateVectorLabel (const float *pData, size_t nDimension)
 Creates a SIL string label object using the input string. More...
 
cvbres_t SilGetExcludedFlag (TSILLABEL Label, cvbbool_t &Excluded)
 Check whether the data associated with a label belongs to the set of excluded classes. More...
 
cvbres_t SilGetFloatVectorLabel (TSILLABEL Handle, float *pTarget, size_t &TargetSize)
 Retrieve the float vector from a TSILLABEL object. More...
 
cvbres_t SilGetStringLabel (TSILLABEL Handle, char *szTarget, size_t &TargetSize)
 Retrieves the string label in the TSILLABEL object. More...
 
cvbres_t SilGetStringLabelW (TSILLABEL Handle, wchar_t *szTarget, size_t &TargetSize)
 Retrieves the string label in the TSILLABEL object. More...
 
cvbres_t SilSetExcludedFlag (TSILLABEL Label, cvbbool_t Exclude)
 Define whether the data associated with a label belongs to the set of excluded classes. More...
 
cvbbool_t SilVerifyLabelCompatibility (TSILLABEL Label, TSILLABELTYPE LabelType)
 Verifies if a label is compatible with a label type descriptor. More...
 

Detailed Description

Exported functions for SIL label handling.

Author
VGi
Since
1.0.0 First version. (VGi, 21.04.2009)

Typedef Documentation

◆ pfTransformSilLabel

typedef cvbbool_t(* pfTransformSilLabel) (void *pPrivate, TSILLABEL LabelIn, TSILLABEL &LabelOut)

SIL label transformation callback.

Parameters
[in]pPrivatePrivate data pointer.
[in]LabelInLabel to be transformed.
[out]LabelOutTransformed label.
Returns
TRUE if the transformation succeeded, FALSE otherwise (FALSE will usually stop the iteration).

◆ TSILLABEL

typedef void* TSILLABEL

Handle to a SIL label entry.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ SilCompareLabels()

cvbval_t SilCompareLabels ( TSILLABEL  LabelA,
TSILLABEL  LabelB 
)

Compares two SIL label objects for equality.

Parameters
[in]LabelALabel to be compared.
[in]LabelBLabel 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)

Creates a SIL string label object using the input string.

This label can then be used for creating/adding new entries to a TSIL using SilAddItem. TSIL objects created with/for string labels are suitable for classification tasks. Note that the object needs to be disposed of after use by calling ReleaseObject on it.

See also
SilCompareLabels, IsSilLabel, SilGetExcludedFlag, SilSetExcludedFlag, SilGetNumDataReferences, SilGetLabelReference
Parameters
[in]szStringname for the label
Returns
label object if creation succeeded, NULL otherwise

◆ SilCreateStringLabelW()

TSILLABEL SilCreateStringLabelW ( const wchar_t *  szString)

Creates a SIL string label object using the input string.

This label can then be used for creating/adding new entries to a TSIL using SilAddItem. TSIL objects created with/for string labels are suitable for classification tasks. Note that the object needs to be disposed of after use by calling ReleaseObject on it.

See also
SilCompareLabels, IsSilLabel, SilGetExcludedFlag, SilSetExcludedFlag, SilGetNumDataReferences, SilGetLabelReference
Parameters
[in]szStringname for the label
Returns
label object if creation succeeded, NULL otherwise

◆ SilCreateVectorLabel()

TSILLABEL SilCreateVectorLabel ( const float *  pData,
size_t  nDimension 
)

Creates a SIL string label object using the input string.

This label can then be used for creating/adding new entries to a TSIL using SilAddItem. TSIL objects created with/for vector labels are suitable for regression tasks. Note that the object needs to be disposed of after use by calling ReleaseObject on it.

See also
SilCompareLabels, IsSilLabel, SilGetExcludedFlag, SilSetExcludedFlag, SilGetNumDataReferences, SilGetLabelReference
Parameters
[in]pDatapointer to the vector data
[in]nDimensionSize of the data pointed to by pData.
Returns
label object if creation succeeded, NULL otherwise

◆ 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]LabelLabel on which to check.
[out]Excludedcurrent 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]HandleInput label object Handle.
[in]pTargetBuffer to which the label vector should be copied.
[in,out]TargetSizeInput: 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]HandleInput label object Handle.
[in]szTargetBuffer to which the label string should be copied.
[in,out]TargetSizeInput: 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]HandleInput label object Handle.
[in]szTargetBuffer to which the label string should be copied.
[in,out]TargetSizeInput: 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]LabelLabel on which to define.
[in]ExcludeExclusion status.
Returns
HRESULT (<0: error)

◆ SilVerifyLabelCompatibility()

cvbbool_t SilVerifyLabelCompatibility ( TSILLABEL  Label,
TSILLABELTYPE  LabelType 
)

Verifies if a label is compatible with a label type descriptor.

Parameters
[in]LabelLabel object to be verified.
[in]LabelTypeLabel type descriptor object.
Returns
TRUE if Label is compatible with LabelType, else FALSE.