Exported functions for SIL data handling. More...
Typedefs | |
typedef cvbbool_t(* | pfTransformSilData) (void *pPrivate, TSILDATA DataIn, TSILDATA &DataOut) |
typedef void * | TSILDATA |
Enumerations | |
enum | TSilDataType { SDT_Undefined = -1 , SDT_ImageData = 0 , SDT_FloatData = 1 } |
Functions | |
cvbval_t | SilCompareData (TSILDATA DataA, TSILDATA DataB) |
Compares two SIL data objects for equality. More... | |
TSILDATA | SilCreateImageData (IMG SourceImage, cvbdim_t nPosX, cvbdim_t nPosY, cvbdim_t nWidth, cvbdim_t nHeight) |
Creates a SIL image data object. More... | |
TSILDATA | SilCreateVectorData (const float *pData, size_t nDimension) |
Creates a SIL vector data object using the input array. More... | |
cvbres_t | SilGetFloatVectorData (TSILDATA Handle, float *pTarget, size_t &TargetSize) |
Copies the vector data from the TSILDATA object. More... | |
cvbres_t | SilGetImageData (TSILDATA Handle, IMG &Image) |
Get the image handle of the SIL image data. More... | |
cvbbool_t | SilVerifyDataCompatibility (TSILDATA Data, TSILDATATYPE DataType) |
Verifies if a datum is compatible with a data type descriptor. More... | |
Exported functions for SIL data handling.
SIL data transformation callback.
[in] | pPrivate | Private data pointer. |
[in] | DataIn | Data to be transformed. |
[out] | DataOut | Transformed data. |
TRUE
if the transformation succeeded, FALSE
otherwise (FALSE
will usually stop the iteration). typedef void* TSILDATA |
Handle to a SIL data entry.
enum TSilDataType |
Compares two SIL data objects for equality.
[in] | DataA | label to be compared |
[in] | DataB | label to be compared |
TSILDATA SilCreateImageData | ( | IMG | SourceImage, |
cvbdim_t | nPosX, | ||
cvbdim_t | nPosY, | ||
cvbdim_t | nWidth, | ||
cvbdim_t | nHeight | ||
) |
Creates a SIL image data object.
The data object is created from the entire input image SourceImage
by extracting a rectangle of size nWidth
x nHeight
(using pixel coordinates) with the top/left of the extraction area located at nPosX
/ nPosY
.
This data object can then be used for creating/adding new entries to a TSIL using SilAddItem. Note that the object needs to be disposed of after use by calling ReleaseObject
on it.
[in] | SourceImage | input image from which to extract |
[in] | nPosX | position at which to extract |
[in] | nPosY | position at which to extract |
[in] | nWidth | size to extract |
[in] | nHeight | size to extract |
TSILDATA
object handle or NULL TSILDATA SilCreateVectorData | ( | const float * | pData, |
size_t | nDimension | ||
) |
Creates a SIL vector data object using the input array.
This data object can then be used for creating/adding new entries to a TSIL using SilAddItem. Note that the object needs to be disposed of after use by calling ReleaseObject
on it.
[in] | pData | location from where to copy the data |
[in] | nDimension | amount of data (# of float) to be copied |
cvbres_t SilGetFloatVectorData | ( | TSILDATA | Handle, |
float * | pTarget, | ||
size_t & | TargetSize | ||
) |
Copies the vector data from the TSILDATA object.
The data will be copied to the location pointed to by pTarget
. pTarget
must be big enough to hold the whole label vector (verify with SilGetFloatVectorDataDim if necessary).
If Handle
does not refer to a float vector data object, an error will be returned.
[in] | Handle | Input data 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 are/must be given in # of elements, not in bytes! |
cvbres_t SilGetImageData | ( | TSILDATA | Handle, |
IMG & | Image | ||
) |
Get the image handle of the SIL image data.
The returned image's reference count will not be modified by handle retrieval, so if the caller intends to use the handle for a longer period of time he/she should call ShareObject
on the image handle to ensure proper lifetime handling.
If the Handle
does not refer to an image data entry, an error will be returned.
[in] | Handle | Input data object Handle |
[out] | Image | handle to the encapsulated image data |
cvbbool_t SilVerifyDataCompatibility | ( | TSILDATA | Data, |
TSILDATATYPE | DataType | ||
) |
Verifies if a datum is compatible with a data type descriptor.
[in] | Data | Data object to be verified. |
[in] | DataType | Data type descriptor object. |
Data
is compatible with DataType
, else FALSE