SignDoc SDK (.NET with exceptions)  5.0.0
SignDocSignatureData Class Reference

Biometric data of handwritten signatures. More...

Public Member Functions

 ~SignDocSignatureData ()
 Destructor. More...
 
 !SignDocSignatureData ()
 Finalizer. More...
 
 SignDocSignatureData ()
 Constructor. More...
 
 SignDocSignatureData (SignDocSignatureData aSource)
 Copy constructor. More...
 
SignDocSignatureData clone ()
 Create a copy of this object. More...
 
SignatureDataType getType ()
 Get the type of handwritten signatures stored in this object. More...
 
bool isEmpty ()
 Check if this object is empty. More...
 
bool isReference ()
 Check if this object contains a reference. More...
 
bool isSignature ()
 Check if this object contains a signature. More...
 
int getNumberOfSignatures ()
 Get the number of signatures in this object. More...
 
int getStaticQuality (SignDocImageParameters aImageParameters)
 Compute the static quality of a reference. More...
 
int getDynamicQuality ()
 Compute the dynamic quality of a reference. More...
 
void clear ()
 Remove all signatures. More...
 
void addEmptySignature ()
 Add an empty signature. More...
 
void add (SignDocSignatureData aSource)
 Add signatures from another SignDocSignatureData object. More...
 
void addFromFile (string aPath, SignatureDataFormat aFlags)
 Add signatures from a file. More...
 
void addFromMemory (byte[] aData, SignatureDataFormat aFlags)
 Add signatures from a blob. More...
 
void loadFromFile (string aPath, SignatureDataFormat aFlags)
 Load (deserialize) signatures from a file. More...
 
void loadFromMemory (byte[] aData, SignatureDataFormat aFlags)
 Load (deserialize) signatures from a blob. More...
 
byte[] saveToMemory (SignatureDataFormat aFormat)
 Serialize this object to a blob. More...
 
void saveToFile (string aPath, SignatureDataFormat aFormat)
 Serialize this object to a file. More...
 
void selectSignature (int aIndex)
 Select a signature for most functions operating on a single signature. More...
 
int getSelectedSignature ()
 Get the index of the currently selected signature. More...
 
int getDeviceId ()
 Get the capture device identifier. More...
 
void setDeviceId (int aDeviceId)
 Set the capture device identifier. More...
 
int getDeviceMaxPressure ()
 Get the maximum pressure (force) value of the capture device. More...
 
int getDevicePressureLevels ()
 Get the number of pressure (force) levels supported by the capture device. More...
 
void setDeviceMaxPressure (int aDeviceMaxPressure)
 Set the maximum pressure (force) value of the capture device. More...
 
int getDeviceResolution ()
 Get the spatial resolution of the capture device. More...
 
void setDeviceResolution (int aDeviceResolution)
 Set the spatial resolution of the capture device. More...
 
int getDeviceSampleRate ()
 Get the sample rate (temporal resolution) of the capture device. More...
 
void setDeviceSampleRate (int aDeviceSampleRate)
 Set the sample rate (temporal resolution) of the capture device. More...
 
byte[] getDeviceSerialNumber ()
 Get the serial number of the capture device. More...
 
void setDeviceSerialNumber (byte[] aData)
 Set the serial number of the capture device. More...
 
uint getTimeStamp ()
 Get the capture time stamp. More...
 
void setTimeStamp (uint aTimeStamp)
 Set the capture time stamp. More...
 
int getNumberOfSamples ()
 Get the number of samples. More...
 
bool hasTimeChannel ()
 Check if the biometric data has a time channel. More...
 
int[] getSample (int aIndex)
 Get a sample. More...
 
SignDocSignatureSample getSignDocSignatureSample (int aIndex)
 Get a sample as SignDocSignatureSample object. More...
 
int getMaxP ()
 Compute the maximum pressure (force) value recorded in the biometric data. More...
 
int getMaxX ()
 Compute the maximum X coordinate recorded in the biometric data. More...
 
int getMaxY ()
 Compute the maximum Y coordinate recorded in the biometric data. More...
 
int getMinX ()
 Compute the minimum X coordinate recorded in the biometric data. More...
 
int getMinY ()
 Compute the minimum Y coordinate recorded in the biometric data. More...
 
int getHeight ()
 Compute the height of the signature. More...
 
int getWidth ()
 Compute the width of the signature. More...
 
void clearSamples ()
 Remove all samples from a signature. More...
 
void addSample (int aX, int aY, int aP)
 Add a sample (without time channel). More...
 
void addSample (int aX, int aY, int aP, int aT)
 Add a sample (with time channel). More...
 
void addSample (ConstArray(int) aSample)
 Add a sample (array of integers). More...
 
void addSignDocSignatureSample (SignDocSignatureSample aSample)
 Add a sample (SignDocSignatureSample object). More...
 
void mirrorY ()
 Mirror signatures vertically. More...
 
bool checkReference (SignDocCheckSignatureParameters aCheckSignatureParameters, SignDocImageParameters aImageParameters)
 Check biometric data of a reference for plausibility. More...
 
int getComplexity (SignDocImageParameters aImageParameters)
 Compute the complexity of a signature. More...
 
bool checkSignature (SignDocCheckSignatureParameters aCheckSignatureParameters, SignDocImageParameters aImageParameters)
 Check biometric data of a signature for plausibility. More...
 
byte[] renderAsImage (SignDocImageParameters aImageParameters, SignDocRenderOutput aOutput)
 Render a signature as image (returned as a blob). More...
 
SignDocImage renderAsSignDocImage (SignDocImageParameters aImageParameters)
 Render a signature as image (returned as a SignDocImage object). More...
 
SignDocMatchResult matchSignature (SignDocSignatureData aOther, SignDocMatchParameters aMatchParameters, SignDocImageParameters aImageParameters)
 Match a single signature against another signature or a reference. More...
 
SignDocMatchResult matchReference (SignDocSignatureData aOther, SignDocMatchParameters aMatchParameters, SignDocImageParameters aImageParameters)
 Match a reference against a single signature. More...
 
string getErrorMessage ()
 Get an error message for the last function call. More...
 

Detailed Description

Biometric data of handwritten signatures.

A SignDocSignatureData object holds any number of handwritten signatures:

To change the state from SignatureDataType.Empty to SignatureDataType.Signature, do one of these:

To change the state from SignatureDataType.Empty to SignatureDataType.Reference, do one of these:

To change from any state to SignatureDataType.Empty, do this:

To change the state from SignatureDataType.Signature to SignatureDataType.Reference, do one of these:

To create an object of type SignatureDataType.Signature from an object of type SignatureDataType.Reference, do this:

  • call cloneSignature()

The origin of the coordinate system is in the upper left corner of the capture device; X coordinates increase to the right, Y coordinates increase downwards. Note that this coordinate system differs from the coordinate system used by ISO 19794-7. Unless flag SignatureDataFormat.iso_flag_compat1 is set, the coordinate system will be transformed appropriately when reading or writing ISO 19794-7 data.

Functions for creating SignDocSignatureData objects:

Functions for getting information about a SignDocSignatureData object:

Functions for modifying a SignDocSignatureData object:

Functions for serializing and deserializing a SignDocSignatureData object:

Functions for getting information about the currently selected signature:

Functions for modifying the currently selected signature:

Other functions:

Constructor & Destructor Documentation

Destructor.

Finalizer.

Constructor.

The new SignDocSignatureData object won't contain any signature. getType() will return SignatureDataType.Empty.

Use loadFromFile() or loadFromMemory() to load signatures. Use add(), addEmptySignature(), addFromFile(), or addFromMemory() to add signatures.

See also
add(), addFromFile(), addFromMemory(), getType(), loadFromFile(), loadFromMemory()

Copy constructor.

Parameters
[in]aSourceThe object to be copied.

Member Function Documentation

void add ( SignDocSignatureData  aSource)

Add signatures from another SignDocSignatureData object.

If this object has type SignatureDataType.Signature and aSource has type SignatureDataType.Signature or SignatureDataType.Reference, this object will become a reference.

All involved signatures must have the same sample rate.

Parameters
[in]aSourceThe source object.
See also
addFromFile(), addFromMemory(), clear(), getType()
void addEmptySignature ( )

Add an empty signature.

If this object has type SignatureDataType.Signature, it will become a reference. If this object has type SignatureDataType.Signature or SignatureDataType.Reference, the new empty signature will inherit the sample rate and capture device ID of the existing signature.

The new signature will be the selected signature.

See also
add(), selectSignature()
void addFromFile ( string  aPath,
SignatureDataFormat  aFlags 
)

Add signatures from a file.

If this object has type SignatureDataType.Signature and the blob in the file contains a signature or a reference, this object will become a reference.

This function opens the file, loads signatures from the file, and closes the file.

Parameters
[in]aPathThe pathname of the file to be read.
[in]aFlagsFlags modifying the behavior of this function:
See also
add(), addFromMemory(), getType(), loadFromFile()
void addFromMemory ( byte[]  aData,
SignatureDataFormat  aFlags 
)

Add signatures from a blob.

If this object has type SignatureDataType.Signature and the blob in aData contains a signature or a reference, this object will become a reference.

Parameters
[in]aDataA serialized SignDocSignatureData object, see saveToMemory().
[in]aFlagsFlags modifying the behavior of this function:
See also
add(), addFromFile(), getType(), loadFromMemory()
void addSample ( int  aX,
int  aY,
int  aP 
)

Add a sample (without time channel).

This function fails if this object already contains a sample with time channel.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aXX coordinate.
[in]aYY coordinate.
[in]aPPressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes.
See also
addEmptySignature(), addSignDocSignatureSample(), clearSamples(), getDeviceSampleRate(), getTimeStamp(), selectSignature(), setTimeStamp()
void addSample ( int  aX,
int  aY,
int  aP,
int  aT 
)

Add a sample (with time channel).

This function fails if aT is -1 and this object already contains a sample with time channel.

This function fails if aT is not -1 and this object already contains a sample without time channel.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aXX coordinate.
[in]aYY coordinate.
[in]aPPressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes.
[in]aTRelative time in milliseconds. Must be -1 if the biometric data does not have a time channel.
See also
addEmptySignature(), addSignDocSignatureSample(), clearSamples(), getDeviceSampleRate(), getTimeStamp(), selectSignature(), setTimeStamp()
void addSample ( ConstArray(int)  aSample)

Add a sample (array of integers).

This function fails if aSample has 3 elements and this object already contains a sample with time channel.

This function fails if aSample has 4 elements and this object already contains a sample without time channel.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aSampleAn array of 3 or 4 integers:
  • X coordinate
  • Y coordinate.
  • Pressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes.
  • Relative time in milliseconds (optional). Must not be negative. The first sample must use 0 for the time. The time is relative to the timestamp set with setTimeStamp().
See also
addEmptySignature(), addSignDocSignatureSample(), clearSamples(), getDeviceSampleRate(), getTimeStamp(), selectSignature(), setTimeStamp()
void addSignDocSignatureSample ( SignDocSignatureSample  aSample)

Add a sample (SignDocSignatureSample object).

This function fails if aSample does not have a time channel and this object already contains a sample with time channel.

This function fails if aSample has a time channel and this object already contains a sample without time channel.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aSampleThe sample as SignDocSignatureSample object.
See also
addEmptySignature(), addSample(), clearSamples(), getDeviceSampleRate(), getTimeStamp(), selectSignature(), setTimeStamp()
bool checkReference ( SignDocCheckSignatureParameters  aCheckSignatureParameters,
SignDocImageParameters  aImageParameters 
)

Check biometric data of a reference for plausibility.

The static and dynamic qualities of a reference should be equal to or greater than a certain value and the variance should be below a certain value. The individual signatures should meet or exceed a certain size and contain a certain number of different pressure levels. The complexity of the individual signatures should be equal to or greater than a certain value.

This function fails if this object does not have type SignatureDataType.Reference.

The following parameters are defined for aCheckSignatureParameters (see SignDocCheckSignatureParameters):

  • ReferenceMinSignatures (integer)
  • ReferenceMinDynamicQuality (integer)
  • ReferenceMinStaticQuality (integer)
  • ReferenceMaxDuration (integer)
  • ReferenceCheckSignatures (boolean)

Additionally, the following parameters will be used if the value of boolean parameter "ReferenceCheckSignatures" is true:

  • SignatureMinWidth (integer)
  • SignatureMinHeight (integer)
  • SignatureMinPressureLevels (integer)
  • SignatureMinComplexity (integer)
  • SignatureMinSamples (integer)
Parameters
[in]aCheckSignatureParametersParameters for checking a signature. Default parameters will be used if this argument is null.
[in]aImageParametersParameters for rendering the signature as image, should be null for using default parameters.
Returns
true if the biometric data passes all checks, false if the biometric data fails any check.
See also
checkSignature(), getDynamicQuality(), getStaticQuality()
bool checkSignature ( SignDocCheckSignatureParameters  aCheckSignatureParameters,
SignDocImageParameters  aImageParameters 
)

Check biometric data of a signature for plausibility.

A handwritten signature should meet or exceed a certain size and contain a certain number of different pressure levels. The static qualitiy of a signature should be equal to or greater than a certain value.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

The following parameters are defined for aCheckSignatureParameters (see SignDocCheckSignatureParameters):

  • SignatureMinWidth (integer)
  • SignatureMinHeight (integer)
  • SignatureMinPressureLevels (integer)
  • SignatureMinComplexity (integer)
  • SignatureMinSamples (integer)
Parameters
[in]aCheckSignatureParametersParameters for checking a signature. Default parameters will be used if this argument is null.
[in]aImageParametersParameters for rendering the signature as image, should be null for using default parameters.
Returns
true if the biometric data passes all checks, false if the biometric data fails any check.
See also
checkReference(), getComplexity(), selectSignature()
void clear ( )

Remove all signatures.

getType() will return SignatureDataType.Empty.

See also
add(), addFromFile(), addFromMemory(), getType()
void clearSamples ( )

Remove all samples from a signature.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

See also
addEmptySignature(), addSample(), addSignDocSignatureSample(), selectSignature()

Create a copy of this object.

Returns
The new object.
int getComplexity ( SignDocImageParameters  aImageParameters)

Compute the complexity of a signature.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aImageParametersParameters for rendering the signature as image, should be null for using default parameters.
Returns
The complexity of the signature in the range 0 (most simple) through 100 (most complex).
See also
checkSignature(), selectSignature()
int getDeviceId ( )

Get the capture device identifier.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The capture device identifier, see CaptureDevice.
See also
selectSignature(), setDeviceId()
int getDeviceMaxPressure ( )

Get the maximum pressure (force) value of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Note
The range of pressure (force) values recorded in the samples is always 0 through 1023.
Some capture device drivers record the number of pressure (force) values rather than the maxium pressure (force) value, that is, they make this function report a value that is off by one. See getDevicePressureLevels() which tries to work around that problem.
Returns
The maximum pressure (force) value of the capture device.
See also
getDevicePressureLevels(), selectSignature(), setDeviceMaxPressure()
int getDevicePressureLevels ( )

Get the number of pressure (force) levels supported by the capture device.

Some capture device drivers record the number of pressure (force) values rather than the maxium pressure (force) value, that is, they getDeviceMaxPressure() report a value that is off by one. This function (getDevicePressureLevels()) tries to work around that problem. It either returns the same value as getDeviceMaxPressure() (if that value looks wrong) or that value plus one (if that value looks good).

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Note
The range of pressure (force) values recorded in the samples is always 0 through 1023.
Returns
The number of pressure (force) levels supported by the capture device.
See also
getDevicePressureLevels(), selectSignature(), setDeviceMaxPressure()
int getDeviceResolution ( )

Get the spatial resolution of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The spatial resolution of the device in 1/inch. This value is used for the X and Y coordinates.
See also
selectSignature(), setDeviceResolution()
int getDeviceSampleRate ( )

Get the sample rate (temporal resolution) of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The number of samples per second or 0 if the biometric data has a time channel.
See also
selectSignature(), setDeviceSampleRate()
byte [] getDeviceSerialNumber ( )

Get the serial number of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Note
Most capture devices do not have a serial number.
Returns
The serial number as an array of bytes, empty if the capture device does not have a serial number.
Note
The WinRT component returns null instead of an empty array.
See also
selectSignature(), setDeviceSerialNumber()
int getDynamicQuality ( )

Compute the dynamic quality of a reference.

This function fails if this object does not have type SignatureDataType.Reference.

Returns
The dynamic quality in the range 0 (bad) through 100 (very good).
See also
checkReference(), getStaticQuality()
string getErrorMessage ( )

Get an error message for the last function call.

Returns
A string describing the reason for the failure of the last function call. The string is empty if the last call succeeded.
int getHeight ( )

Compute the height of the signature.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The maximum X coordinate minus the minimum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
See also
getMaxX(), getMinX(), getSample(), getWidth(), selectSignature()
int getMaxP ( )

Compute the maximum pressure (force) value recorded in the biometric data.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The maximum pressure (force) value (0 through 1023), zero if there are no samples.
See also
getSample(), getDeviceMaxPressure(), getDevicePressureLevels(), selectSignature()
int getMaxX ( )

Compute the maximum X coordinate recorded in the biometric data.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The maximum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
See also
getHeight(), getMaxY(), getMinX(), getMinY(), getSample(), getWidth(), selectSignature()
int getMaxY ( )

Compute the maximum Y coordinate recorded in the biometric data.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The maximum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
See also
getHeight(), getMaxX(), getMinX(), getMinY(), getSample(), getWidth(), selectSignature()
int getMinX ( )

Compute the minimum X coordinate recorded in the biometric data.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The minimum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
See also
getHeight(), getMaxX(), getMaxY(), getMinY(), getSample(), getWidth(), selectSignature()
int getMinY ( )

Compute the minimum Y coordinate recorded in the biometric data.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The minimum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
See also
getHeight(), getMaxX(), getMaxY(), getMinX(), getSample(), getWidth(), selectSignature()
int getNumberOfSamples ( )

Get the number of samples.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The number of samples.
See also
getSample(), getSignDocSignatureSample(), hasTimeChannel(), selectSignature()
int getNumberOfSignatures ( )

Get the number of signatures in this object.

References contain two or more signatures, objects of type SignatureDataType.Signature contain one signature, objects of type SignatureDataType.Empty contain zero signatures.

Returns
The number of signatures.
See also
cloneSignature(), getType(), selectSignature()
int [] getSample ( int  aIndex)

Get a sample.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty or if aIndex is out of range.

The array containing the sample will have either 3 or 4 elements:

  • X coordinate
  • Y coordinate
  • pressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes
  • relative time in milliseconds (optional).
Parameters
[in]aIndexThe 0-based index of the sample.
Returns
The sample at the specified index.
See also
getSignDocSignatureSample(), hasTimeChannel(), selectSignature()
int getSelectedSignature ( )

Get the index of the currently selected signature.

Returns
The index of the currently selected signature or -1 if no signature is selected.
See also
selectSignature()
SignDocSignatureSample getSignDocSignatureSample ( int  aIndex)

Get a sample as SignDocSignatureSample object.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aIndexThe 0-based index of the sample.
Returns
The sample at the specified index.
See also
getNumberOfSamples(), getSample(), hasTimeChannel(), selectSignature()
int getStaticQuality ( SignDocImageParameters  aImageParameters)

Compute the static quality of a reference.

This function matches all signatures of the reference aginst all signatures of the reference using the static matching engine and returns the smallest match quality.

It is highly recommended to check the static quality if you intend to use the static matching engine. The result is the greater the more similar the signatures of the reference are.

This function fails if this object does not have type SignatureDataType.Reference.

Parameters
[in]aImageParametersParameters for rendering the signature as image, should be null for using default parameters.
Returns
The smallest static match quality encountered (0 through 100).
See also
checkReference(), getDynamicQuality()
uint getTimeStamp ( )

Get the capture time stamp.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The capture time in seconds since 1970-01-01T00:00Z or zero if the time stamp is not available.
See also
selectSignature(), setTimeStamp()
SignatureDataType getType ( )

Get the type of handwritten signatures stored in this object.

Returns
The type of handwritten signatures stored in this object:
See also
getNumberOfSignatures(), isEmpty(), isReference(), isSignature()
int getWidth ( )

Compute the width of the signature.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Returns
The maximum Y coordinate minus the minimum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
See also
getHeight(), getMaxY(), getMinY(), getSample(), selectSignature()
bool hasTimeChannel ( )

Check if the biometric data has a time channel.

This function returns false if this object has type SignatureDataType.Empty or if this object has type SignatureDataType.Reference and no signature has been selected with selectSignature().

Returns
true iff the biometric data has a time channel.
See also
getSample(), getNumberOfSamples(), selectSignature()
bool isEmpty ( )

Check if this object is empty.

Returns
true iff getType() returns SignatureDataType.Empty.
See also
getType(), isReference(), isSignature()
bool isReference ( )

Check if this object contains a reference.

Returns
true iff getType() returns SignatureDataType.Reference.
See also
getType(), isEmpty(), isSignature()
bool isSignature ( )

Check if this object contains a signature.

Returns
true iff getType() returns SignatureDataType.Signature.
See also
getType(), isEmpty(), isReference()
void loadFromFile ( string  aPath,
SignatureDataFormat  aFlags 
)

Load (deserialize) signatures from a file.

This function is equivalent to clear() followed by addFromFile().

Parameters
[in]aPathThe pathname of the file to be read.
[in]aFlagsFlags modifying the behavior of this function:
See also
add(), addFromFile(), getType(), loadFromMemory()
void loadFromMemory ( byte[]  aData,
SignatureDataFormat  aFlags 
)

Load (deserialize) signatures from a blob.

This function is equivalent to clear() followed by addFromMemory().

Parameters
[in]aDataA serialized SignDocSignatureData object, see saveToMemory().
[in]aFlagsFlags modifying the behavior of this function:
See also
add(), addFromMemory(), getType(), loadFromFile()
SignDocMatchResult matchReference ( SignDocSignatureData  aOther,
SignDocMatchParameters  aMatchParameters,
SignDocImageParameters  aImageParameters 
)

Match a reference against a single signature.

This function fails if this object does not have type SignatureDataType.Reference.

If aOther has type SignatureDataType.Reference, selectSignature() must have been called at least once for aOther to select the signature to match against.

matchSignature() matches a single signature against a single signature or a reference, matchReference() matches a reference against a single signature.

The license must allow comparing signatures.

Note
This function is not symmetric: if aOther has type SignatureDataType.Reference, only one signature in that reference will be matched against this reference.
Parameters
[in]aOtherThe signature to match against.
[in]aMatchParametersParameters controlling how signature are matched. If this argument is null, all parameters will be set to their respective default value.
[in]aImageParametersParameters controlling how signature are rendered as images for static matching. If this argument is null, all parameters will be set to their respective default value. String parameter "Format" will be ignored.
Returns
A new SignDocMatchResult object.
See also
matchSignature(), selectSignature(), SignDocImage.matchReference()
SignDocMatchResult matchSignature ( SignDocSignatureData  aOther,
SignDocMatchParameters  aMatchParameters,
SignDocImageParameters  aImageParameters 
)

Match a single signature against another signature or a reference.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object does not have type SignatureDataType.Signature or SignatureDataType.Reference.

matchSignature() matches a single signature against a single signature or a reference, matchReference() matches a reference against a single signature.

The license must allow comparing signatures.

Note
This function is not symmetric: if this object has type SignatureDataType.Reference, only one signature in that reference will be matched against aOther. On the other hand, if aOther has type SignatureDataType.Reference, all signatures in that reference will be matched against.
Only the static matching engine can match a single signature against a single signature.
Parameters
[in]aOtherThe signature or reference to match against.
[in]aMatchParametersParameters controlling how signature are matched. If this argument is null, all parameters will be set to their respective default value.
[in]aImageParametersParameters controlling how signature are rendered as images for static matching. If this argument is null, all parameters will be set to their respective default value. String parameter "Format" will be ignored.
Returns
A new SignDocMatchResult object.
See also
matchReference(), selectSignature(), SignDocImage.matchSignature()
void mirrorY ( )

Mirror signatures vertically.

The signatures are mirrored such that for each signature the range of Y coordinates is not changed.

There is no function for mirroring a single signature of a reference.

byte [] renderAsImage ( SignDocImageParameters  aImageParameters,
SignDocRenderOutput  aOutput 
)

Render a signature as image (returned as a blob).

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

The following parameter in aImageParameters is mandatory:

  • Format (string)

There are three ways to specify the size of the image:

  • Set integer parameter "Resolution". This requires the spatial resolution of the capture device to be correctly recorded (see getDeviceResolution()). Coordinates will be scaled such that the resulting image will have the specified resolution. Floating-point parmateter "Zoom" must not be set. If integer parameter "Width" or "Height" (or both) are set, the resolution will be reduced (if needed) such that the image width or height (or both) won't exceed the specified values.
  • Set integer parameters "Width" or "Height" parameter (or both). Integer parameter "Resolution" and floating-point parameter "Zoom" must not be set. Coordinates will be scaled such that the with or height (or both) of the image won't exceed the specified sizes.
  • Set floating-point parameter "Zoom". Convert sample coordinates to image coordinates by multiplying them with the specified number. If integer parameter "Resolution" is set, the image resolution will be set to the specified value (but that value won't affect scaling). Integer parameters "Width" and "Height" must not be set.

The license must allow rendering signatures.

Parameters
[in]aImageParametersParameters controlling how the signature is rendered.
[in,out]aOutputThe image size will be stored here. You can pass null if you don't need the image size. This argument must not be null for raw format.
Returns
The rendered image.
See also
getHeight(), getWidth(), renderAsSignDocImage(), selectSignature()
SignDocImage renderAsSignDocImage ( SignDocImageParameters  aImageParameters)

Render a signature as image (returned as a SignDocImage object).

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

See renderAsImage() for details. String parameter "Format" is ignored by this function.

The license must allow rendering signatures.

Parameters
[in]aImageParametersParameters controlling how the signature is rendered.
Returns
The new SignDocImage object.
See also
renderAsImage(), selectSignature()
void saveToFile ( string  aPath,
SignatureDataFormat  aFormat 
)

Serialize this object to a file.

Empty objects can be serialized only if aFormat is SignatureDataFormat.softpro.

Parameters
[in]aPathThe pathname of the file to be created or overwritten.
[in]aFormatFormat to be used, see enum SignatureDataFormat: either SignatureDataFormat.softpro or a combination (bitwise or) of up to one constant from each of the following three groups: For some formats, you can additionally include (bitwise or) these flags:
See also
addFromFile(), getErrorMessage(), loadFromFile(), saveToMemory()
byte [] saveToMemory ( SignatureDataFormat  aFormat)

Serialize this object to a blob.

Empty objects can be serialized only if aFormat is SignatureDataFormat.softpro.

Parameters
[in]aFormatFormat to be used, see enum SignatureDataFormat: either SignatureDataFormat.softpro or a combination (bitwise or) of up to one constant from each of the following three groups: For some formats, you can additionally include (bitwise or) these flags:
Returns
The serialized data.
See also
addFromMemory(), getErrorMessage(), loadFromMemory(), saveToFile()
void selectSignature ( int  aIndex)

Select a signature for most functions operating on a single signature.

If this object contains a single signature (getType() returns SignatureDataType.Signature), selectSignature() need not be called. If this object contains a multiple signatures (getType() returns SignatureDataType.Reference), selectSignature() must be called before any of these functions can be used:

The following functions also have an effect on what signature is selected:

Parameters
[in]aIndex0-based index of the signature to be selected or -1 to make no signature selected.
See also
addEmptySignature(), addSample(), addSignDocSignatureSample(), clear(), clearSamples(), cloneSignature(), getComplexity(), getDeviceId(), getDeviceMaxPressure(), getDevicePressureLevels(), getDeviceResolution(), getDeviceSampleRate(), getDeviceSerialNumber(), getHeight(), getMaxP(), getMaxX(), getMaxY(), getMinX(), getMinY(), getNumberOfSamples(), getNumberOfSignatures(), getSample(), getSelectedSignature(), getSignDocSignatureSample(), getTimeStamp(), getWidth(), hasTimeChannel(), loadFromFile(), loadFromMemory(), matchReference(), matchSignature(), renderAsImage(), renderAsSignDocImage(), setDeviceId(), setDeviceMaxPressure(), setDeviceResolution(), setDeviceSampleRate(), setDeviceSerialNumber(), setTimeStamp()
void setDeviceId ( int  aDeviceId)

Set the capture device identifier.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aDeviceIdThe new capture device identifier, see CaptureDevice.
See also
getDeviceId(), selectSignature()
void setDeviceMaxPressure ( int  aDeviceMaxPressure)

Set the maximum pressure (force) value of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Note
The range of pressure (force) values recorded in the samples is always 0 through 1023.
Parameters
[in]aDeviceMaxPressureThe new maximum pressure (force) value of the capture device.
See also
getDeviceMaxPressure(), getDevicePressureLevels(), selectSignature()
void setDeviceResolution ( int  aDeviceResolution)

Set the spatial resolution of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aDeviceResolutionThe new device resolution in 1/inch. This value is used for the X and Y coordinates.
See also
getDeviceResolution(), selectSignature()
void setDeviceSampleRate ( int  aDeviceSampleRate)

Set the sample rate (temporal resolution) of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aDeviceSampleRateThe new number of samples per second or 0 if the biometric data has a time channel.
See also
getDeviceSampleRate(), selectSignature()
void setDeviceSerialNumber ( byte[]  aData)

Set the serial number of the capture device.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aDataThe new serial number of the capture device (0 through 20 bytes).
See also
getDeviceSerialNumber(), selectSignature()
void setTimeStamp ( uint  aTimeStamp)

Set the capture time stamp.

If this object has type SignatureDataType.Reference, selectSignature() must be called once before this function.

This function fails if this object has type SignatureDataType.Empty.

Parameters
[in]aTimeStampThe capture time in seconds since 1970-01-01T00:00Z or zero if the time stamp is not available.
See also
getTimeStamp(), selectSignature()

The documentation for this class was generated from the following file: