Converting EEG data from .h5 file for import

We recently added to Brainstorm an external HDF5 reading library:
https://github.com/brainstorm-tools/brainstorm3/tree/master/external/easyh5
Can you read these .h5 files with the function loadh5.m?

If it works, the best would be to write reading functions for the recordings based on this library:

  • Creating a file reader for the TVB .h5 file: in_fopen_tvb.m, in_fread_tvbh5.m (plenty of examples available)
  • Reference the file format TVB-H5 in bst_get('FileFilters') > 'data' and 'raw'
  • Add the file format TVB-H5 to the big switch in in_fopen.m and in_fread.m

For the head model, it would be very complicated to import the surfaces to the Brainstorm database without the MRI, as everything in Brainstorm is based on anatomical landmarks set on the MRI.
A lot of the information we need from the FreeSurfer is probably probably useless to the purposes of the TVB and therefore not imported (registration information with the MRI, spherical atlas coregistration, atlases...). The changes of coordinate systems needed for anatomical registration can be an endless nightmare, just so you know before digging further in this direction :slight_smile:

We're evaluating the possibility to use SPM12/CAT12 routinely instead of FreeSurfer. If you find the MRI somewhere, you might find a way to export it as a .nii file, then you could import it into Brainstorm and reprocess it with CAT instead of having to re-run FreeSurfer.
https://neuroimage.usc.edu/brainstorm/Tutorials/SegCAT12