SignDoc SDK (C++)  5.0.0
SignDocSignatureData Class Reference

Biometric data of handwritten signatures. More...

#include <SignDocSDK-cpp.h>

Public Types

enum  Type { t_empty, t_signature, t_reference }
 Type of handwritten signatures stored in a SignDocSignatureData object. More...
 
enum  Format {
  f_iso_mask_single = 0x000000ff, f_iso_mask_wrapper = 0x00000f00, f_iso_mask_bdb = 0x0000f000, f_iso_mask_data = 0x000f0000,
  f_iso_mask_flags = 0xfff00000, f_softpro = 4, f_iso_19785_3_none = 0x00000000, f_iso_19785_3_format2 = 0x00000200,
  f_iso_19785_3_format3 = 0x00000300, f_iso_19785_3_format6 = 0x00000600, f_iso_19794_7_2007tc1 = 0x00001000, f_iso_19794_7_2014 = 0x00002000,
  f_iso_19794_7_full = 0x00000000, f_iso_flag_meters = 0x00100000, f_iso_flag_no_fix = 0x00200000, f_iso_flag_compat1 = 0x00400000,
  f_iso_flag_no_ext_data = 0x00800000
}
 Blob format flags. More...
 
enum  CaptureDevice {
  cd_unknown = 0, cd_intuos = 1, cd_mobinetix = 2, cd_graphire = 3,
  cd_bs_hesy = 4, cd_pl400 = 5, cd_epos = 6, cd_esig = 7,
  cd_eink = 8, cd_penpartner = 9, cd_tabletpc = 10, cd_stepover = 11,
  cd_eid = 12, cd_mtldc = 13, cd_mtlpd = 14, cd_epad2 = 15,
  cd_bluem = 16, cd_bluemlcd = 17, cd_tzse = 18, cd_epadls = 19,
  cd_eink2 = 20, cd_eid2 = 21, cd_signpad = 22, cd_bamboo = 23,
  cd_Verifone_mx = 24, cd_ingenico_sc350 = 25, cd_ipad = 501, cd_iphone = 502,
  cd_ipod = 503, cd_olivetti_zpad_b8001 = 510, cd_samsung_gt_n7000 = 511, cd_htc_p510e = 512,
  cd_android_touch = 513, cd_html5_capture = 514, cd_olivetti_graphos_a10 = 515, cd_ensign10 = 1000,
  cd_vpsign = 1001, cd_user_first = 10000, cd_user_last = 10999
}
 Capture device identifiers. More...
 

Public Member Functions

 SignDocSignatureData ()
 Constructor. More...
 
 SignDocSignatureData (const SignDocSignatureData &aSource)
 Copy constructor. More...
 
 ~SignDocSignatureData ()
 Destructor. More...
 
SignDocSignatureDataoperator= (const SignDocSignatureData &aSource)
 Assignment operator. More...
 
void swap (SignDocSignatureData &aOther)
 Efficiently swap this object with another one. More...
 
Type getType () const
 Get the type of handwritten signatures stored in this object. More...
 
bool isEmpty () const
 Check if this object is empty. More...
 
bool isReference () const
 Check if this object contains a reference. More...
 
bool isSignature () const
 Check if this object contains a signature. More...
 
int getNumberOfSignatures () const
 Get the number of signatures in this object. More...
 
ReturnCode getStaticQuality (const SignDocImageParameters *aImageParameters, int &aOutput) const
 Compute the static quality of a reference. More...
 
ReturnCode getDynamicQuality (int &aOutput) const
 Compute the dynamic quality of a reference. More...
 
void clear ()
 Remove all signatures. More...
 
ReturnCode addEmptySignature ()
 Add an empty signature. More...
 
ReturnCode add (const SignDocSignatureData &aSource)
 Add signatures from another SignDocSignatureData object. More...
 
ReturnCode addFromFile (Encoding aEncoding, const std::string &aPath, unsigned aFlags)
 Add signatures from a file. More...
 
ReturnCode addFromFile (const wchar_t *aPath, unsigned aFlags)
 Add signatures from a file. More...
 
ReturnCode addFromMemory (const unsigned char *aPtr, size_t aSize, unsigned aFlags)
 Add signatures from a blob. More...
 
ReturnCode loadFromFile (const wchar_t *aPath, unsigned aFlags)
 Load (deserialize) signatures from a file. More...
 
ReturnCode loadFromFile (Encoding aEncoding, const std::string &aPath, unsigned aFlags)
 Load (deserialize) signatures from a file. More...
 
ReturnCode loadFromMemory (const unsigned char *aPtr, size_t aSize, unsigned aFlags)
 Load (deserialize) signatures from a blob. More...
 
ReturnCode saveToMemory (std::vector< unsigned char > &aOutput, int aFormat) const
 Serialize this object to a blob. More...
 
ReturnCode saveToFile (Encoding aEncoding, const std::string &aPath, int aFormat) const
 Serialize this object to a file. More...
 
ReturnCode saveToFile (const wchar_t *aPath, int aFormat) const
 Serialize this object to a file. More...
 
ReturnCode selectSignature (int aIndex)
 Select a signature for most functions operating on a single signature. More...
 
int getSelectedSignature () const
 Get the index of the currently selected signature. More...
 
ReturnCode getDeviceId (int &aOutput) const
 Get the capture device identifier. More...
 
ReturnCode setDeviceId (int aDeviceId)
 Set the capture device identifier. More...
 
ReturnCode getDeviceMaxPressure (int &aOutput) const
 Get the maximum pressure (force) value of the capture device. More...
 
ReturnCode getDevicePressureLevels (int &aOutput) const
 Get the number of pressure (force) values supported by the capture device. More...
 
ReturnCode setDeviceMaxPressure (int aDeviceMaxPressure)
 Set the maximum pressure (force) value of the capture device. More...
 
ReturnCode getDeviceResolution (int &aOutput) const
 Get the spatial resolution of the capture device. More...
 
ReturnCode setDeviceResolution (int aDeviceResolution)
 Set the spatial resolution of the capture device. More...
 
ReturnCode getDeviceSampleRate (int &aOutput) const
 Get the sample rate (temporal resolution) of the capture device. More...
 
ReturnCode setDeviceSampleRate (int aDeviceSampleRate)
 Set the sample rate (temporal resolution) of the capture device. More...
 
ReturnCode getDeviceSerialNumber (std::vector< unsigned char > &aOutput) const
 Get the serial number of the capture device. More...
 
ReturnCode setDeviceSerialNumber (const unsigned char *aPtr, size_t aSize)
 Set the serial number of the capture device. More...
 
ReturnCode getTimeStamp (unsigned &aOutput) const
 Get the capture time stamp. More...
 
ReturnCode setTimeStamp (unsigned aTimeStamp)
 Set the capture time stamp. More...
 
ReturnCode getNumberOfSamples (int &aOutput) const
 Get the number of samples. More...
 
bool hasTimeChannel () const
 Check if the biometric data has a time channel. More...
 
ReturnCode getSample (int aIndex, int &aX, int &aY, int &aP, int &aT) const
 Get a sample. More...
 
ReturnCode getMaxP (int &aOutput) const
 Compute the maximum pressure (force) value recorded in the biometric data. More...
 
ReturnCode getMaxX (int &aOutput) const
 Compute the maximum X coordinate recorded in the biometric data. More...
 
ReturnCode getMaxY (int &aOutput) const
 Compute the maximum Y coordinate recorded in the biometric data. More...
 
ReturnCode getMinX (int &aOutput) const
 Compute the minimum X coordinate recorded in the biometric data. More...
 
ReturnCode getMinY (int &aOutput) const
 Compute the minimum Y coordinate recorded in the biometric data. More...
 
ReturnCode getHeight (int &aOutput) const
 Compute the height of the signature. More...
 
ReturnCode getWidth (int &aOutput) const
 Compute the width of the signature. More...
 
ReturnCode clearSamples ()
 Remove all samples from a signature. More...
 
ReturnCode addSample (int aX, int aY, int aP, int aT)
 Add a sample. More...
 
ReturnCode mirrorY ()
 Mirror signatures vertically. More...
 
ReturnCode checkReference (const SignDocCheckSignatureParameters *aCheckSignatureParameters, const SignDocImageParameters *aImageParameters, bool &aOutput) const
 Check biometric data of a reference for plausibility. More...
 
ReturnCode getComplexity (const SignDocImageParameters *aImageParameters, int &aOutput) const
 Compute the complexity of a signature. More...
 
ReturnCode checkSignature (const SignDocCheckSignatureParameters *aCheckSignatureParameters, const SignDocImageParameters *aImageParameters, bool &aOutput) const
 Check biometric data of a signature for plausibility. More...
 
ReturnCode renderAsImage (std::vector< unsigned char > &aImage, const SignDocImageParameters &aImageParameters, SignDocRenderOutput *aOutput) const
 Render a signature as image (returned as a blob). More...
 
ReturnCode renderAsSignDocImage (const SignDocImageParameters &aImageParameters, std::unique_ptr< SignDocImage > &aImage) const
 Render a signature as image (returned as a SignDocImage object). More...
 
ReturnCode matchSignature (const SignDocSignatureData &aOther, const SignDocMatchParameters *aMatchParameters, const SignDocImageParameters *aImageParameters, std::unique_ptr< SignDocMatchResult > &aOutput) const
 Match a single signature against another signature or a reference. More...
 
ReturnCode matchReference (const SignDocSignatureData &aOther, const SignDocMatchParameters *aMatchParameters, const SignDocImageParameters *aImageParameters, std::unique_ptr< SignDocMatchResult > &aOutput) const
 Match a reference against a single signature. More...
 
const char * getErrorMessage (Encoding aEncoding) const
 Get an error message for the last function call. More...
 
const wchar_t * getErrorMessageW () const
 Get an error message for the last function call. More...
 
void setErrorMessage (Encoding aEncoding, const std::string &aMessage)
 Set the error message. More...
 
 SignDocSignatureData (SIGNDOC_SignatureData *aP)
 Internal function. More...
 
SIGNDOC_SignatureData * getImpl ()
 Internal function. More...
 
const SIGNDOC_SignatureData * getImpl () const
 Internal function. More...
 
void setImpl (SIGNDOC_SignatureData *aP)
 Internal function. More...
 

Detailed Description

Biometric data of handwritten signatures.

A SignDocSignatureData object holds any number of handwritten signatures:

To change the state from t_empty to t_signature, do one of these:

To change the state from t_empty to t_reference, do one of these:

To change from any state to t_empty, do this:

To change the state from t_signature to t_reference, do one of these:

To create an object of type t_signature from an object of type t_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 f_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:

Member Enumeration Documentation

Capture device identifiers.

Most of these are obsolete.

Enumerator
cd_unknown 

Unknown capture device.

cd_intuos 

Wacom Intuos.

cd_mobinetix 

MobiNetix.

cd_graphire 

Wacom Graphire.

cd_bs_hesy 

BS Hesy.

cd_pl400 

Wacmo PL400.

cd_epos 

Interlink ePAD Point of Sales.

cd_esig 

Interlink ePad E-Signature.

cd_eink 

Interlink ePad-Ink E-Signature.

cd_penpartner 

Wacom PenPartner.

cd_tabletpc 

Tablet PC.

Integrated Tablet PC capture device.

cd_stepover 

StepOver.

cd_eid 

Interlink Epad-ID.

cd_mtldc 

MotionTouch LegaPad LCD.

cd_mtlpd 

MotionTouch LegaPad.

MotionTouch LegaPad tablet without LDC.

cd_epad2 

Interlink ePad II.

cd_bluem 

Stepover blueM II.

Stepover blueM II tablet without LCD.

cd_bluemlcd 

Stepover blueM II with LCD.

cd_tzse 

Topaz tablet with LCD (and pressure).

Topaz LCD SE.

cd_epadls 

Interlink EPad-LS.

cd_eink2 

Interlink EPad-Ink Pro.

cd_eid2 

Interlink EPad-ID Pro.

cd_signpad 

Wacom SignPad.

STU-300, STU-500, etc.

cd_bamboo 

Wacom Bamboo.

cd_Verifone_mx 

Verifone MX 800 series.

cd_ingenico_sc350 

Ingenico iSC350.

cd_ipad 

Apple iPad.

cd_iphone 

Apple iPhone.

cd_ipod 

Apple iPod.

cd_olivetti_zpad_b8001 

Olivetti Graphos zPad-B8001.

cd_samsung_gt_n7000 

Samsung GT-N7000.

cd_htc_p510e 

HTC Flyer P510e.

cd_android_touch 

mobilephone touch.

Android touch device.

cd_html5_capture 

HTML5 capture client.

cd_olivetti_graphos_a10 

Olivetti Graphos A10.

cd_ensign10 

Euronovate ENSign10.

cd_vpsign 

VPSign.

cd_user_first 

First user-defined device identifier.

cd_user_last 

Last user-defined device identifier.

enum Format

Blob format flags.

Enumerator
f_iso_mask_single 

Mask for blob format: formats specified by a single value.

f_iso_mask_wrapper 

Mask for blob format: CBEFF wrapper.

f_iso_mask_bdb 

Mask for blob format: BDB format.

f_iso_mask_data 

Mask for blob format: data format.

f_iso_mask_flags 

Mask for blob format: flags.

f_softpro 

Blob format: SOFTPRO Flatfile format for dynamic signatures and references.

See also
saveToFile(), saveToMemory()
f_iso_19785_3_none 

Blob format: No ISO/IEC 19785-3:2015 (CBEFF) wrapper.

This should be used with f_iso_19794_7_2014 (version 2) only as ISO/IEC 19794-7:2007 (version 1) requires a CBEFF wrapper. However, some products accept only unwrapped version 1 BDBs.

Note
This is the default value for the CBEFF wrapper as the value of this constant is zero.
Compact format (not yet implemented) requires a CBEFF wrapper.
f_iso_19785_3_format2 

Blob format: Use ISO/IEC 19785-3:2015 patron format type 2 ("minimum simple byte-oriented patron format") CBEFF wrapper.

This can be used with f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. With f_iso_19794_7_2007tc1, this patron format cannot be used for saving references.

Deprecated:
Patron format type 2 has been deprecated in ISO/IEC 19785-3:2015, please use f_iso_19794_7_2014 with f_iso_19785_3_none.
f_iso_19785_3_format3 

Blob format: Use ISO/IEC 19785-3:2015 patron format type 3 ("maximum simple patron format (byte oriented) using presence bitmap") CBEFF wrapper.

This can be used with f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. With f_iso_19794_7_2007tc1, this patron format cannot be used for saving references.

Deprecated:
Patron format type 3 has been deprecated in ISO/IEC 19785-3:2015, please use f_iso_19794_7_2014 with f_iso_19785_3_none.
f_iso_19785_3_format6 

Blob format: Use ISO/IEC 19785-3:2015 patron format type 6 ("complex patron format") CBEFF wrapper.

This can be used with f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. Both signatures and references can be saved with this patron format.

Deprecated:
Patron format type 6 has been deprecated in ISO/IEC 19785-3:2015, please use f_iso_19794_7_2014 with f_iso_19785_3_none.
f_iso_19794_7_2007tc1 

Blob format: ISO/IEC 19794-7:2007 (with Technical Corrigendum 1) Biometric Data Block (version 1).

Please also use f_iso_19785_3_format2, f_iso_19785_3_format3, or f_iso_19785_3_format6 to specify the ISO/IEC 19785-3 wrapper. Alternateively, use f_iso_19785_3_none (signature) to omit the CBEFF wrapper; the CBEFF wrapper is mandatory in ISO/IEC 19794-7:2007, but some products accept only unwrapped BDBs. f_iso_19785_3_format6 is required for saving references, signatures can be saved with any of these constants.

Please also use f_iso_19794_7_full (default) to select the data format.

You can include flag f_iso_flag_meters for using ISO/IEC 19794-7:2007 without Technical Corrigendum 1.

You can include flag f_iso_flag_compat1 for bug compatibility with SignWare before version 3.2.9.0.

You can include flag f_iso_flag_no_ext_data to omit extended data.

f_iso_19794_7_2014 

Blob format: ISO/IEC 19794-7:2014 Biometric Data Block (version 2).

Please also use f_iso_19785_3_none, f_iso_19785_3_format2, f_iso_19785_3_format3, or f_iso_19785_3_format6 to specify the ISO/IEC 19785-3 wrapper. Unlike ISO/IEC 19794-7:2007, ISO/IEC 19794-7:2014 allows BDBs without CBEFF wrapper. Both signatures and references can be saved with any of these constants.

Please also use f_iso_19794_7_full (default) to select the data format.

f_iso_19794_7_full 

Blob format: ISO/IEC 19794-7 full format.

To be used with either f_iso_19794_7_2007tc1 or f_iso_19794_7_2014.

Contrast with compact format, compression format, and XML, all of which are not yet supported.

Note
This is the default value for the data format as the value of this constant is zero.
f_iso_flag_meters 

Blob format flag: Use meters rather than millimeters for X and Y coordinates.

ISO-format signatures written by SignWare before version 3.2.9.0 use meters as units for the X and Y coordinates as specified by the original version of ISO/IEC 19794-7:2007. Technical Corrigendum for ISO/IEC 19794-7:2007 changed the units to millimeters.

Set this flag for compatibility with software that implements ISO/IEC 19794-7:2007 without Technical Corrigendum 1.

This flag takes effect only if the Biometric Data Block is in ISO/IEC 19794-7:2007 format (version 1).

For loading signatures or references written by SignWare before version 3.2.9.0, just leave f_iso_flag_no_fix unset rather than setting this flag.

For saving signatures or references to be read by SignWare before version 3.2.9.0, set f_iso_flag_compat1 rather than this flag.

This flag is ignored for non-ISO formats.

See also
f_iso_flag_compat1, f_iso_flag_no_fix
f_iso_flag_no_fix 

Blob format flag: do not attempt to automatically fix ISO-format signatures that have been written by SignWare before version 3.2.9.0.

ISO-format signatures written by SignWare before version 3.2.9.0 have multiple issues:

  • the origin is in the upper left corner rather than in the lower left corner.
  • Technical Corrigendum 1 for ISO/IEC 19794-7:2007 is not implemented. In consequence, the X and Y scaling factors are based on meters rather than millimeters.
  • for CBEFF patron format type 6, garbage is written for bdbCreationDate if the signature does not have a timestamp.
  • the CBEFF wrapper does not use the correct BDB format type.

These bugs have been fixed in SignWare 3.2.9.0.

When loading a signature or reference, all of these issues will be fixed automatically if data written by SignWare before version 3.2.9.0 is detected, unless this flag (f_iso_flag_no_fix) is set.

If this flag is set, no attempt is made to fix the data. If the signature or reference was indeed written by SignWare before version 3.2.9.0, loading will fail or the data read will be incorrect.

When saving a signature or reference, this flag must not be set.

This flag is ignored for non-ISO formats.

See also
f_iso_flag_compat1, f_iso_flag_meters
f_iso_flag_compat1 

Blob format flag: write with bug compatibility with SignWare before version 3.2.9.0.

ISO-format signatures written by SignWare before version 3.2.9.0 have multiple issues:

  • the origin is in the upper left corner rather than in the lower left corner.
  • Technical Corrigendum 1 for ISO/IEC 19794-7:2007 is not implemented. In consequence, the X and Y scaling factors are based on meters rather than millimeters.
  • for CBEFF patron format type 6, garbage is written for bdbCreationDate if the signature does not have a timestamp.
  • the CBEFF wrapper does not use the correct BDB format type.

These bugs have been fixed in SignWare 3.2.9.0.

Use this flag for saving signatures in a format that is bug-compatible with old versions of SignWare (except for the bdbCreationDate bug). Extended data will be omitted (see f_iso_flag_no_ext_data).

When saving a signature or reference, this flag takes effect only if the Biometric Data Block is in ISO/IEC 19794-7:2007 format (version 1) with a patron format type 2, 3, or 6 CBEFF wrapper, that is, for format f_iso_19794_7_2007tc1 (with f_iso_19785_3_format2, f_iso_19785_3_format3, or f_iso_19785_3_format6).

When loading a signature or reference, this flag must not be set.

This flag is ignored for non-ISO formats.

See also
f_iso_flag_meters, f_iso_flag_no_fix
f_iso_flag_no_ext_data 

Blob format flag: Omit or ignore extended data.

By default, extended data will be written that includes the following information:

  • a version number
  • the SPTablet device ID
  • the tablet serial ID

If this flag is set, extended data won't be added when saving a signature or reference and extended data will be ignored when loading a signature or reference.

This flag is ignored for non-ISO formats.

See also
f_iso_flag_compat1
enum Type

Type of handwritten signatures stored in a SignDocSignatureData object.

This is the return type of getType().

Enumerator
t_empty 

Empty.

SignDocSignatureData objects of this type do not contain any handwritten signature.

t_signature 

Signature.

SignDocSignatureData objects of this type contain exactly one handwritten signature.

t_reference 

Reference.

SignDocSignatureData objects of this type contain two or more handwritten signatures.

Constructor & Destructor Documentation

Constructor.

The new SignDocSignatureData object won't contain any signature. getType() will return t_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()
SignDocSignatureData ( const SignDocSignatureData aSource)
inline

Copy constructor.

Parameters
[in]aSourceThe object to be copied.
~SignDocSignatureData ( )
inline

Destructor.

SignDocSignatureData ( SIGNDOC_SignatureData *  aP)
inline

Internal function.

Member Function Documentation

ReturnCode add ( const SignDocSignatureData aSource)
inline

Add signatures from another SignDocSignatureData object.

If this object has type t_signature and aSource has type t_signature or t_reference, this object will become a reference.

All involved signatures must have the same sample rate.

Parameters
[in]aSourceThe source object.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if the sample rates do not match.
See also
addFromFile(), addFromMemory(), clear(), getType()
ReturnCode addEmptySignature ( )
inline

Add an empty signature.

If this object has type t_signature, it will become a reference. If this object has type t_signature or t_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.

Returns
ReturnCode::rc_ok if successful.
See also
add(), selectSignature()
ReturnCode addFromFile ( Encoding  aEncoding,
const std::string &  aPath,
unsigned  aFlags 
)
inline

Add signatures from a file.

If this object has type t_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]aEncodingThe encoding of aPath.
[in]aPathThe pathname of the file to be read.
[in]aFlagsFlags modifying the behavior of this function:
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if an argument is invalid or if the sample rates do not match or if the blob is invalid.
See also
add(), addFromMemory(), getType(), loadFromFile()
ReturnCode addFromFile ( const wchar_t *  aPath,
unsigned  aFlags 
)
inline

Add signatures from a file.

If this object has type t_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:
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if an argument is invalid or if the sample rates do not match or if the blob is invalid.
See also
add(), addFromMemory(), getType(), loadFromFile()
ReturnCode addFromMemory ( const unsigned char *  aPtr,
size_t  aSize,
unsigned  aFlags 
)
inline

Add signatures from a blob.

If this object has type t_signature and the blob pointed to by aPtr contains a signature or a reference, this object will become a reference.

Parameters
[in]aPtrA pointer to the first octet of a serialized SignDocSignatureData object, see saveToMemory().
[in]aSizeSize in octets of the blob pointed to by aPtr.
[in]aFlagsFlags modifying the behavior of this function:
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if an argument is invalid or if the sample rates do not match or if the blob is invalid.
See also
add(), addFromFile(), getType(), loadFromMemory()
ReturnCode addSample ( int  aX,
int  aY,
int  aP,
int  aT 
)
inline

Add a sample.

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 t_reference, selectSignature() must be called once before this function.

This function fails if this object has type t_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.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if this object has type t_empty or if aP or aT is invalid.
See also
addEmptySignature(), clearSamples(), getDeviceSampleRate(), getTimeStamp(), selectSignature(), setTimeStamp()
ReturnCode checkReference ( const SignDocCheckSignatureParameters aCheckSignatureParameters,
const SignDocImageParameters aImageParameters,
bool &  aOutput 
) const
inline

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 throws an exception if this object does not have type t_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 nullptr.
[in]aImageParametersA pointer to parameters for rendering the signature as image, should be nullptr for using default parameters.
[out]aOutputThe result will be stored here: true if the biometric data passes all checks, false if the biometric data fails any check.
Returns
ReturnCode::rc_ok iff successful.
See also
checkSignature(), getDynamicQuality(), getStaticQuality()
ReturnCode checkSignature ( const SignDocCheckSignatureParameters aCheckSignatureParameters,
const SignDocImageParameters aImageParameters,
bool &  aOutput 
) const
inline

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 t_reference, selectSignature() must be called once before this function.

This function fails if this object has type t_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 nullptr.
[in]aImageParametersA pointer to parameters for rendering the signature as image, should be nullptr for using default parameters.
[out]aOutputThe result will be stored here: true if the biometric data passes all checks, false if the biometric data fails any check.
Returns
ReturnCode::rc_ok iff successful.
See also
checkReference(), getComplexity(), selectSignature()
void clear ( )
inline

Remove all signatures.

getType() will return t_empty.

See also
add(), addFromFile(), addFromMemory(), getType()
ReturnCode clearSamples ( )
inline

Remove all samples from a signature.

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

This function fails if this object has type t_empty.

Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if this object has type t_empty.
See also
addEmptySignature(), addSample(), selectSignature()
ReturnCode getComplexity ( const SignDocImageParameters aImageParameters,
int &  aOutput 
) const
inline

Compute the complexity of a signature.

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

This function fails if this object has type t_empty.

Parameters
[in]aImageParametersA pointer to parameters for rendering the signature as image, should be nullptr for using default parameters.
[out]aOutputThe complexity of the signature in the range 0 (most simple) through 100 (most complex).
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
checkSignature(), selectSignature()
ReturnCode getDeviceId ( int &  aOutput) const
inline

Get the capture device identifier.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe capture device identifier, see enum CaptureDevice.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
selectSignature(), setDeviceId()
ReturnCode getDeviceMaxPressure ( int &  aOutput) const
inline

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

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

This function fails if this object has type t_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.
Parameters
[out]aOutputThe maximum pressure (force) value of the capture device.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getDevicePressureLevels(), selectSignature(), setDeviceMaxPressure()
ReturnCode getDevicePressureLevels ( int &  aOutput) const
inline

Get the number of pressure (force) values 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 t_reference, selectSignature() must be called once before this function.

This function fails if this object has type t_empty.

Note
The range of pressure (force) values recorded in the samples is always 0 through 1023.
Parameters
[out]aOutputThe number of pressure (force) values supported by the capture device.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getDeviceMaxPressure(), selectSignature(), setDeviceMaxPressure()
ReturnCode getDeviceResolution ( int &  aOutput) const
inline

Get the spatial resolution of the capture device.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe spatial resolution of the device in 1/inch. This value is used for the X and Y coordinates.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
selectSignature(), setDeviceResolution()
ReturnCode getDeviceSampleRate ( int &  aOutput) const
inline

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

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe number of samples per second or 0 if the biometric data has a time channel.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
selectSignature(), setDeviceSampleRate()
ReturnCode getDeviceSerialNumber ( std::vector< unsigned char > &  aOutput) const
inline

Get the serial number of the capture device.

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

This function fails if this object has type t_empty.

Note
Most capture devices do not have a serial number.
Parameters
[out]aOutputThe serial number as an array of bytes, empty if the capture device does not have a serial number.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
selectSignature(), setDeviceSerialNumber()
ReturnCode getDynamicQuality ( int &  aOutput) const
inline

Compute the dynamic quality of a reference.

This function fails if this object does not have type t_reference.

Parameters
[out]aOutputThe dynamic quality in the range 0 (bad) through 100 (very good).
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object is not a reference.
See also
checkReference(), getStaticQuality()
const char * getErrorMessage ( Encoding  aEncoding) const
inline

Get an error message for the last function call.

Parameters
[in]aEncodingThe encoding to be used for the error message.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until this object is destroyed or a member function of this object is called.
See also
getErrorMessageW()
const wchar_t * getErrorMessageW ( ) const
inline

Get an error message for the last function call.

Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until this object is destroyed or a member function of this object is called.
See also
getErrorMessage()
ReturnCode getHeight ( int &  aOutput) const
inline

Compute the height of the signature.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe 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.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getMaxX(), getMinX(), getSample(), getWidth(), selectSignature()
SIGNDOC_SignatureData* getImpl ( )
inline

Internal function.

const SIGNDOC_SignatureData* getImpl ( ) const
inline

Internal function.

ReturnCode getMaxP ( int &  aOutput) const
inline

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

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe maximum pressure (force) value (0 through 1023), zero if there are no samples.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getSample(), getDeviceMaxPressure(), getDevicePressureLevels(), selectSignature()
ReturnCode getMaxX ( int &  aOutput) const
inline

Compute the maximum X coordinate recorded in the biometric data.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe maximum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getHeight(), getMaxY(), getMinX(), getMinY(), getSample(), getWidth(), selectSignature()
ReturnCode getMaxY ( int &  aOutput) const
inline

Compute the maximum Y coordinate recorded in the biometric data.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe maximum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getHeight(), getMaxX(), getMinX(), getMinY(), getSample(), getWidth(), selectSignature()
ReturnCode getMinX ( int &  aOutput) const
inline

Compute the minimum X coordinate recorded in the biometric data.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe minimum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getHeight(), getMaxX(), getMaxY(), getMinY(), getSample(), getWidth(), selectSignature()
ReturnCode getMinY ( int &  aOutput) const
inline

Compute the minimum Y coordinate recorded in the biometric data.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe minimum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getHeight(), getMaxX(), getMaxY(), getMinX(), getSample(), getWidth(), selectSignature()
ReturnCode getNumberOfSamples ( int &  aOutput) const
inline

Get the number of samples.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe number of samples.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getSample(), hasTimeChannel(), selectSignature()
int getNumberOfSignatures ( ) const
inline

Get the number of signatures in this object.

References contain two or more signatures, objects of type t_signature contain one signature, objects of type t_empty contain zero signatures.

Returns
The number of signatures.
See also
cloneSignature(), getType(), selectSignature()
ReturnCode getSample ( int  aIndex,
int &  aX,
int &  aY,
int &  aP,
int &  aT 
) const
inline

Get a sample.

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

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

Parameters
[in]aIndexThe 0-based index of the sample.
[out]aXX coordinate.
[out]aYY coordinate.
[out]aPPressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes.
[out]aTRelative time in milliseconds. Set to -1 if the biometric data does not have a time channel.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aIndex is out of range.
See also
hasTimeChannel(), selectSignature()
int getSelectedSignature ( ) const
inline

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()
ReturnCode getStaticQuality ( const SignDocImageParameters aImageParameters,
int &  aOutput 
) const
inline

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

Parameters
[in]aImageParametersParameters for rendering the signature as image, should be nullptr for using default parameters.
[out]aOutputThe smallest static match quality encountered (0 through 100).
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object is not a reference.
See also
checkReference(), getDynamicQuality()
ReturnCode getTimeStamp ( unsigned &  aOutput) const
inline

Get the capture time stamp.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe capture time in seconds since 1970-01-01T00:00Z or zero if the time stamp is not available.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
selectSignature(), setTimeStamp()
SignDocSignatureData::Type getType ( ) const
inline

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()
ReturnCode getWidth ( int &  aOutput) const
inline

Compute the width of the signature.

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

This function fails if this object has type t_empty.

Parameters
[out]aOutputThe 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.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected.
See also
getHeight(), getMaxY(), getMinY(), getSample(), selectSignature()
bool hasTimeChannel ( ) const
inline

Check if the biometric data has a time channel.

This function returns false if this object has type t_empty or if this object has type t_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 ( ) const
inline

Check if this object is empty.

Returns
true iff getType() returns t_empty.
See also
getType(), isReference(), isSignature()
bool isReference ( ) const
inline

Check if this object contains a reference.

Returns
true iff getType() returns t_reference.
See also
getType(), isEmpty(), isSignature()
bool isSignature ( ) const
inline

Check if this object contains a signature.

Returns
true iff getType() returns t_signature.
See also
getType(), isEmpty(), isReference()
ReturnCode loadFromFile ( const wchar_t *  aPath,
unsigned  aFlags 
)
inline

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:
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if an argument or the blob is invalid.
See also
add(), addFromFile(), getType(), loadFromMemory()
ReturnCode loadFromFile ( Encoding  aEncoding,
const std::string &  aPath,
unsigned  aFlags 
)
inline

Load (deserialize) signatures from a file.

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

Parameters
[in]aEncodingThe encoding of aPath.
[in]aPathThe pathname of the file to be read.
[in]aFlagsFlags modifying the behavior of this function:
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if an argument or the blob is invalid.
See also
add(), addFromFile(), getType(), loadFromMemory()
ReturnCode loadFromMemory ( const unsigned char *  aPtr,
size_t  aSize,
unsigned  aFlags 
)
inline

Load (deserialize) signatures from a blob.

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

Parameters
[in]aPtrA pointer to the first octet of a serialized SignDocSignatureData object, see saveToMemory().
[in]aSizeSize in octets of the blob pointed to by aPtr.
[in]aFlagsFlags modifying the behavior of this function:
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if an argument or the blob is invalid.
See also
add(), addFromMemory(), getType(), loadFromFile()
ReturnCode matchReference ( const SignDocSignatureData aOther,
const SignDocMatchParameters aMatchParameters,
const SignDocImageParameters aImageParameters,
std::unique_ptr< SignDocMatchResult > &  aOutput 
) const
inline

Match a reference against a single signature.

This function fails if this object does not have type t_reference.

If aOther has type t_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 t_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 nullptr, 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 nullptr, all parameters will be set to their respective default value. String parameter "Format" will be ignored.
[out]aOutputA pointer to a new SignDocMatchResult object or nullptr will be stored here. The caller is responsible for destroying that object.
Returns
ReturnCode::rc_ok iff successful.
See also
matchSignature(), selectSignature(), SignDocImage::matchReference()
ReturnCode matchSignature ( const SignDocSignatureData aOther,
const SignDocMatchParameters aMatchParameters,
const SignDocImageParameters aImageParameters,
std::unique_ptr< SignDocMatchResult > &  aOutput 
) const
inline

Match a single signature against another signature or a reference.

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

This function fails if this object does not have type t_signature or t_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 t_reference, only one signature in that reference will be matched against aOther. On the other hand, if aOther has type t_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 nullptr, 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 nullptr, all parameters will be set to their respective default value. String parameter "Format" will be ignored.
[out]aOutputA pointer to a new SignDocMatchResult object or nullptr will be stored here. The caller is responsible for destroying that object.
Returns
ReturnCode::rc_ok iff successful.
See also
matchReference(), selectSignature(), SignDocImage::matchSignature()
ReturnCode mirrorY ( )
inline

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.

Returns
ReturnCode::rc_ok if successful.
SignDocSignatureData & operator= ( const SignDocSignatureData aSource)
inline

Assignment operator.

Parameters
[in]aSourceThe source object.
Returns
This object.
ReturnCode renderAsImage ( std::vector< unsigned char > &  aImage,
const SignDocImageParameters aImageParameters,
SignDocRenderOutput aOutput 
) const
inline

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

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

This function fails if this object has type t_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
[out]aImageThe rendered image will be stored here.
[in]aImageParametersParameters controlling how the signature is rendered.
[out]aOutputThe image size will be stored here. You can pass nullptr if you don't need the image size. This argument must not be nullptr for raw format.
Returns
ReturnCode::rc_ok iff successful.
See also
getHeight(), getWidth(), renderAsSignDocImage(), selectSignature()
ReturnCode renderAsSignDocImage ( const SignDocImageParameters aImageParameters,
std::unique_ptr< SignDocImage > &  aImage 
) const
inline

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

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

This function fails if this object has type t_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.
[out]aImageThe new SignDocImage object will be stored here.
Returns
ReturnCode::rc_ok iff successful.
See also
renderAsImage(), selectSignature()
ReturnCode saveToFile ( Encoding  aEncoding,
const std::string &  aPath,
int  aFormat 
) const
inline

Serialize this object to a file.

Empty objects can be serialized only if aFormat is f_softpro.

Parameters
[in]aEncodingThe encoding of aPath.
[in]aPathThe pathname of the file to be created or overwritten.
[in]aFormatFormat to be used, see enum Format: either f_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
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if aFormat is invalid.
See also
addFromFile(), getErrorMessage(), loadFromFile(), saveToMemory()
ReturnCode saveToFile ( const wchar_t *  aPath,
int  aFormat 
) const
inline

Serialize this object to a file.

Empty objects can be serialized only if aFormat is f_softpro.

Parameters
[in]aPathThe pathname of the file to be created or overwritten.
[in]aFormatFormat to be used, see enum Format: either f_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
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if aFormat is invalid.
See also
addFromFile(), getErrorMessage(), loadFromFile(), saveToMemory()
ReturnCode saveToMemory ( std::vector< unsigned char > &  aOutput,
int  aFormat 
) const
inline

Serialize this object to a blob.

Empty objects can be serialized only if aFormat is f_softpro.

Parameters
[out]aOutputThe serialized data will be stored here.
[in]aFormatFormat to be used, see enum Format: either f_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
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if aFormat is invalid.
See also
addFromMemory(), getErrorMessage(), loadFromMemory(), saveToFile()
ReturnCode selectSignature ( int  aIndex)
inline

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

If this object contains a single signature (getType() returns t_signature), selectSignature() need not be called. If this object contains a multiple signatures (getType() returns t_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.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if aIndex is out of range.
See also
addEmptySignature(), addSample(), clear(), clearSamples(), cloneSignature(), getComplexity(), getDeviceId(), getDeviceMaxPressure(), getDevicePressureLevels(), getDeviceResolution(), getDeviceSampleRate(), getDeviceSerialNumber(), getHeight(), getMaxP(), getMaxX(), getMaxY(), getMinX(), getMinY(), getNumberOfSamples(), getNumberOfSignatures(), getSample(), getSelectedSignature(), getTimeStamp(), getWidth(), hasTimeChannel(), loadFromFile(), loadFromMemory(), matchReference(), matchSignature(), renderAsImage(), renderAsSignDocImage(), setDeviceId(), setDeviceMaxPressure(), setDeviceResolution(), setDeviceSampleRate(), setDeviceSerialNumber(), setTimeStamp()
ReturnCode setDeviceId ( int  aDeviceId)
inline

Set the capture device identifier.

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

This function fails if this object has type t_empty.

Parameters
[in]aDeviceIdThe new capture device identifier, see enum CaptureDevice.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aDeviceId is out of range.
See also
getDeviceId(), selectSignature()
ReturnCode setDeviceMaxPressure ( int  aDeviceMaxPressure)
inline

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

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

This function fails if this object has type t_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.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aDeviceMaxPressure is out of range.
See also
getDeviceMaxPressure(), getDevicePressureLevels(), selectSignature()
ReturnCode setDeviceResolution ( int  aDeviceResolution)
inline

Set the spatial resolution of the capture device.

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

This function fails if this object has type t_empty.

Parameters
[in]aDeviceResolutionThe new device resolution in 1/inch. This value is used for the X and Y coordinates.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aDeviceResolution is out of range.
See also
getDeviceResolution(), selectSignature()
ReturnCode setDeviceSampleRate ( int  aDeviceSampleRate)
inline

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

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

This function fails if this object has type t_empty.

Parameters
[in]aDeviceSampleRateThe new number of samples per second or 0 if the biometric data has a time channel.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aDeviceSampleRate is out of range.
See also
getDeviceSampleRate(), selectSignature()
ReturnCode setDeviceSerialNumber ( const unsigned char *  aPtr,
size_t  aSize 
)
inline

Set the serial number of the capture device.

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

This function fails if this object has type t_empty.

Parameters
[in]aPtrA pointer to the first octet of the new serial number of the capture device.
[in]aSizeThe number of octets in the new serial number (0 through 20).
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aPtr is nullptr or if aSize is out of range.
See also
getDeviceSerialNumber(), selectSignature()
void setErrorMessage ( Encoding  aEncoding,
const std::string &  aMessage 
)
inline

Set the error message.

void setImpl ( SIGNDOC_SignatureData *  aP)
inline

Internal function.

ReturnCode setTimeStamp ( unsigned  aTimeStamp)
inline

Set the capture time stamp.

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

This function fails if this object has type t_empty.

Parameters
[in]aTimeStampThe capture time in seconds since 1970-01-01T00:00Z or zero if the time stamp is not available.
Returns
ReturnCode::rc_ok if successful, ReturnCode::rc_invalid_argument if this object has type t_reference and no signature has been selected or if aTimeStamp is out of range.
See also
getTimeStamp(), selectSignature()
void swap ( SignDocSignatureData aOther)
inline

Efficiently swap this object with another one.

Parameters
[in]aOtherThe other object.

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