I"m using Neurotechnology Biometric SDK 10.0 (trial) and SQLite as the database engine. I need to store the additional fields (like age) in the database. In order to enable this custom data support i specify a CustomDataSchema property in NBiometricClient:
- Code: Select all
NBiometricClient biometricClient;
biometricClient.SetCustomDataSchema(NBiographicDataSchema::Parse(N_T("(Age int)")));
Where: "Age" - the column name, "int" - the additional field type.
To enroll subject with the additional field with name "Age" to the database i"m using a SetProperty method in NSubject:
- Code: Select all
NSubject subject = <...create subject...>
NLAttributes attributes = <...get age value...>
subject.SetProperty(N_T("Age"), attributes.GetAge());
All works fine, the subjects with the additional field with name "Age" are enrolled to the database. But how can i retrieve this additional subject field from the database? I tried the next approach (but it does not work):
- Code: Select all
NArrayWrapper<NSubject> list = biometricClient.List();
for (NArrayWrapper<NSubject>::iterator it = list.begin(); it != list.end(); it++)
{
if (it->GetProperties().Contains(N_T("Age")))
{
NInt age = it->GetProperty<NInt>(N_T("Age"));
cout << " Age: " << age << endl;
}
}
But this approach does not work: NSubject GetProperties method return no any age property.
My question is: how can i retrieve the additional subject field (like age) from the database?
Thanks a lot!