Learn R Programming

ieegio: IO toolbox for Intracranial Electroencephalography

The goal of ieegio is to provide integrated toolbox for common file formats used in intracranial Electroencephalography (iEEG) and deep-brain stimulation (DBS). Currently the package is under active development.

Installation

You can install the development version of ieegio from GitHub with:

# install.packages("pak")
pak::pak("dipterix/ieegio")

ieegio provides additional sample data. To download them:

# list all the sample data
sample_names <- ieegio::ieegio_sample_data()

lapply(sample_names, ieegio::ieegio_sample_data)

List 1: read formatted ephys data (examples)

The following formats have been (or will be) supported. Please feel free to make a wish-list by posting an issue in this repository.

Electrophysiology

NameCommon ExtensionsReadWrite
EDF(+)/BDF(+) (European Data Format)*.edfread_edf
BrainVision*.vhdr, *.vmrk, *.eeg, *.datread_brainvis
BCI2000*.datread_bci2000
NEV/NSx (BlackRock neural-event/signal)*.nev, *.ns1, *.ns2, ..., *.ns6read_nsx
NWB (Neurodata Without Borders)*.nwbread_nwb*
MEF*.mef

* - NWB format only has low-level support due to its format nature. Please see examples with help(read_nwb)

List 2: read imaging data (examples)

Imaging

NameCommon ExtensionsReadWrite
NIfTI (Neuroimaging Informatics Technology Initiative)*.nii[.gz]read_volume (io_read_nii)write_volume (io_write_nii)
MGH/MGZ (Massachusetts General Hospital format)*.mgh, *.mgzread_volume (io_read_mgz)write_volume (io_write_mgz)
GIfTI (Geometry format under the NIfTI)*.gii[.gz]read_surface (io_read_gii)write_surface (io_write_gii)
FreeSurfer surfacee.g. *h.pial, *h.whiteread_surface (io_read_fs(type="geometry"))write_surface(format="freesurfer", type="geometry")
FreeSurfer node values/weightse.g. *h.curv, *h.sulcread_surface (io_read_fs(type="measurements"))write_surface(format="freesurfer", type="measurements")
Surface annotation*.annotread_surface (io_read_fs(type="annotations"))write_surface(format="freesurfer", type="annotations")

List 3: common file formats used for meta data

NameCommon ExtensionsReadWrite
Matlab*.matio_read_matio_write_mat
HDF5*.h5io_read_h5io_write_h5
YAML*.yml, *.yamlio_read_yamlio_write_yaml
JSON*.jsonio_read_jsonio_write_json
INI*.iniio_read_ini
FST*.fstio_read_fstio_write_fst

Copy Link

Version

Install

install.packages('ieegio')

Monthly Downloads

252

Version

0.0.4

License

MIT + file LICENSE

Maintainer

Zhengjia Wang

Last Published

March 7th, 2025

Functions in ieegio (0.0.4)

read_brainvis

Read 'BrainVision' data
merge.ieegio_surface

Merge two 'ieegio' surfaces
io_write_h5

Save objects to 'HDF5' file without trivial checks
read_bci2000

Read 'BCI2000' data file
plot.ieegio_surface

Plot '3D' surface objects
plot.ieegio_volume

Plot '3D' volume in anatomical slices
resample_volume

Down-sample or super-sample volume
read_nwb

Read 'NWB' format
pynwb_module

Install 'NWB' via 'pynwb'
read_edf

Read 'EDF' or 'BDF' data file
read_nsx

Read ('BlackRock') 'NEV' 'NSx' data
ieegio_sample_data

Download sample files
LazyH5

Lazy 'HDF5' file loader
imaging-surface

Read and write surface files
SignalDataCache

Class definition for signal cache
as_ieegio_surface

Convert other surface formats to ieegio surface
imaging-volume

Read and write volume data
io_h5_valid

Check whether a 'HDF5' file can be opened for read/write
burn_volume

Burn image at given positions
NWBHDF5IO

Creates a NWBHDF5IO file container
as_ieegio_volume

Convert objects to 'ieegio' image volumes
merge.ieegio_volume

Merge 'ieegio' volumes
io_read_h5

Lazy Load 'HDF5' File via hdf5r-package
low-level-read-write

Low-level file read and write