how to input unicode symbol into the P300 speller

Forum for software developers to discuss BCI2000 software development
Locked
normal
Posts: 10
Joined: 03 Sep 2009, 10:02

how to input unicode symbol into the P300 speller

Post by normal » 28 Apr 2010, 23:51

Is there a simple solution to input the unicode or user-defined symbols into P300 speller ? I mean if I change the source code to support the unicode in P3Speller, will that affect the threads of other processing?

Thanks!

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 29 Apr 2010, 08:13

BCI2000 currently does not support unicode. Its parameter definition needs to be extended to properly support unicode. This has not been done yet.

When modifying the P3Speller code to use unicode characters, you will probably need to hard-code the content of the TargetDefinitions and TextToSpell parameters, and change the text type properties in the TextStimulus and SpellerTarget classes to be of type std::wstring rather than std::string.

--Juergen

normal
Posts: 10
Joined: 03 Sep 2009, 10:02

Post by normal » 04 May 2010, 03:03

Dear Juergen,

Thank you very much for your reply. We are trying on this following your instruction, and will update the status on this method.

Another thing also confuses me in P300Speller. The parameter configuration has a section called "Speller Targets". If I save the target matrix (alphabets) with the "Save Matrix" button under the "TargetDefinitions" and then read back the saved target matrix, an error is popped up as below.

P3SpellerTask::Preflight: Could not load image from file "%".

However, if I save the parameter file and read back the parameter file with the same matrix (manually inputted in the GUI) , it is workable.

What's the problem with that? It seems that BCI2000 read the matrix with different file format? If yes, what is the correct matrix format?

Thanks!

--Hongying


The unreadable matrix file is as below:
A A 1 % %
B B 1 % %
C C 1 % %
D D 1 % %
E E 1 % %
F F 1 % %
G G 1 % %
H H 1 % %
I I 1 % %
J J 1 % %
K K 1 % %
L L 1 % %
M M 1 % %
N N 1 % %
O O 1 % %
P P 1 % %

The workable parameter setting for TargetDefinitions is as below:

Application:Speller%20Targets:P3SpellerTask matrix TargetDefinitions= 16 { Display Enter Display%20Size Icon%20File Sound%20File } A A 1 % % B B 1 % % C C 1 % % D D 1 % % E E 1 % % F F 1 % % G G 1 % % H H 1 % % I I 1 % % J J 1 % % K K 1 % % L L 1 % % M M 1 % % N N 1 % % O O 1 % % P P 1 % % // speller target properties

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 04 May 2010, 09:30

Dear Hongying,

there was a bug in the function reading matrices--it would not recognize BCI2000's string escape character "%", and treat it as if it were a value.

This bug is now fixed. Please get the latest revision (r2800) of the BCI2000 source code to get the fix.

Thanks for reporting,
--Juergen

Locked

Who is online

Users browsing this forum: No registered users and 1 guest