Nicolet events/annotations

Hello,

The importation of Nicolet (.e) files works as intended when it comes to time series and channel info but the extracted events do not match the ones in the original .e file. It seems Brainstorm relies on https://github.com/ieeg-portal/Nicolet-Reader for the importation, and unfortunately it appears this class "Cannot read events/annotation layers". I was wondering if there was another way to retrieve the annotations from Nicolet files using Brainstorm ?

Thanks,

Anthony

Unfortunately, there is nothing we can do with Nicolet files beside what the Nicolet-Reader class provide.
Can you extract these events to a different file using the Nicolet software? You could try contacting the Natus customer support for help with this.

I opened an issue on their Github repository, maybe they can help you (subscribe to this issue to receive email notifications):

Thanks a lot for the feedback.

It's possible to export the events into a .txt file using their free viewer (https://neuro.natus.com/neuro-support) : https://partners.natus.com/asset/resource/32316

Regards.

Please export your events as a .txt file and post the file here.
I will try to find a solution for you to import it in Brainstorm (from the Record tab, menu File > Add events from file).

Thanks for your help.
Here is an example of the events of a Nicolet file extracted using aforementioned natus tool.

nicolet_events.txt (468 Bytes)

Thanks
I will write a reader for these files.
Are the files created with a .txt extension by default?

Yes.
Although you have an option to export the events to an .xls file it's the exact same content. It seems to be the raw text file but with .xls extension. Excel actually does not identify the generated .xls file as a valid spreadsheet so i would avoid it.

I added an option to read the .txt file your shared:
https://github.com/brainstorm-tools/brainstorm3/commit/9c58338d0d0b4aa1f57841653a306b104f52ca07

Update Brainstorm (menu Update > Update Brainstorm).
Link the Nicolet .e file to the database, double-click on the "Link to raw file" to open it.
In the Record tab, menu File > Add events from file > Select the file format "Nicolet export (.txt)"

Note that these annotations are exported with a 1-second precision...

Thanks i now can see the correct events once imported from the text file.
However there seems to be an issue with time calculation as the minutes are not taken into account.
For example if the event is : > Cortical Stim 00:19:40 00:14 (HH:MM:SS)
The "Cortical Stim" event in Brainstorm will be at 40.000-54.000 instead of 1180.0000-1194.0000
Regards.

Using capitalized letters for the datevec Matlab function did the trick.
In in_events_nicolet:
line 52: vecStart = datevec(splitLine{2}, 'HH:MM:SS');
line 54: vecDuration = datevec(splitLine{3}, 'MM:SS');

I'm using it on my local version of Brainstorm.

Regards.

Thanks for the fix.
Implemented here: https://github.com/brainstorm-tools/brainstorm3/commit/529418b37242203bf5c5a61edad982307686b7da

Hello François,

I'm having an issue for Nicolet recordings > 1h. After taking a look at the code i noticed in in_events_nicolet.m at line 53:

tStart = vecStart(4)*1200+ vecStart(5)*60 + vecStart(6);

Instead of:

tStart = vecStart(4)*3600 + vecStart(5)*60 + vecStart(6);

On a side note for people reading this thread: if you're extracting events using a non-english version of the Natus tool you will have to translate into english the "Name Time Duration" line in the text file.

Regards.

Thanks for reporting these issues.
Does this commit fix both of them? (trying to identify the events lines with the number of tab characters)

Both issues are resolved as far as i can tell. Thanks.