The Brain Imaging Data Structure
and its use for fNIRS research
--- to be presented at the NIRS toolkit at the Donders ---
Robert Oostenveld
r.oostenveld@donders.ru.nl
What is the Brain Imaging Data Structure
 http://bids.neuroimaging.org
 https://bids-specification.readthedocs.io
 Not a file format, but a way of structuring your data and providing metadata
– It specifies which file formats are to be used (i.e. NIfTI, json, tsv)
– It specifies the naming convention for files and directories
– It addresses the problem of metadata getting lost while doing your research
– Details from DICOM headers are lost in converting DICOM to NIfTI
– Details about the participants that are not documented digitally
– Details about the cognitive task an/or experimental manipulations
https://xkcd.com/927/
Rather than as a “standard” (see below),
you should consider it a widely supported “best practice”
Brain Imaging Data Structure
 BIDS was initiated at Stanford to address the challenges of OpenFMRI.org (now OpenNeuro.org)
 Main focus is on “brain” imaging, i.e. neuroimaging, which is often done in cognitive neuroscience
 It not only focusses on the imaging aspect
– Also on the cognitive part of the research (i.e. behavior)
– Also on other measures of activity (i.e. physiology)
 In 2016 BIDS was specified for MRI and fMRI, in 2018 also MEG, in 2019 also for EEG and iEEG,
and more extensions are in the works
 BIDS is used by default at the DCCN for most (f)MRI data and most MEG data
 It is a style of research data management (RDM) that you can also use elsewhere
– … for modalities that are not in the specification (fNIRS, eyetracker, video, motion capture)
– … for data that is not from brain imaging experiments
An example of raw data with MRI, MEG and EEG
data/README
CHANGES
dataset_description.json
participants.tsv
/sub-01/anat/…
/sub-01/meg/…
/sub-01/eeg/sub-01_task-auditory_eeg.edf
/sub-01/eeg/sub-01_task-auditory_eeg.json
/sub-01/eeg/sub-01_task-auditory_channels.tsv
/sub-01/eeg/sub-01_task-auditory_events.tsv
/sub-01/eeg/sub-01_electrodes.tsv
/sub-01/eeg/sub-01_coordinates.json
Actual EEG data
Directory
structure
Metadata
Project background
 BIDS is the result of the ongoing collaboration of people like you!
 BIDS consists of the specification, of tools, and of the communication platforms
 The specification is the result of sharing knowledge, discussion, and consensus
– Email discussion list
– Shared Google docs
– GitHub
 Well-specified governance structure
 BIDS extensions projects are called “BEPs” and have a leader
 Steering group
– Guimar Niso, Russ Poldrack, Kirstie Whitacker, Melanie Ganz, Robert Oostenveld
BIDS Extension Proposals, i.e. BEPs
 BIDS is an open and growing standard
– 2016: fMRI
– 2018: MEG
– 2019: EEG and iEEG
– Soon (2020): PET, ASL, Structutal MR with multiple contrasts
– Multiple Contrast MR = BEP001, see here
– PET = BEP009, see here
– ASL = BEP005, see here
– There are (have been) 27 extensions proposals so far (up to BEP027)
– Proposals to extend BIDS have to follow certain rules, as explained in the BEP Guide
– It has to fit in the bigger picture
– It has to represent a wide community consensus
BIDS for fNIRS, i.e. BEP028?
 Benefits of sharing and reusing data are (hopefully) obvious
 A common specification
– Improves data interoperability and reusability
– Improves scientific quality and reproducibility
– Facilitates shared tool and pipeline development
– Reduces stress, since you don’t have to come up with everything yourself
 Society for functional Near Infrared Spectroscopy – http://fnirs.org
– fNIRS conferences in Boston (2010), London (2012), Montreal (2014), Paris (2016), Tokyo
(2018), Boston (Oct 2020)
– Shared Near Infrared Spectroscopy Format (SNIRF) is designed by the community in an
effort to facilitate sharing and analysis of NIRS data.
SNIRF format
 File format for NIRS data, like OXY3 or OXY4 from Artinis, or like EDF, CNT, VHDR for EEG
 Open format, based on the HDF5 “container” file format with an explicit description of the
content and structure
 Readers available for MATLAB and Python
 HDF5 libraries available for C/C++ and many other languages
 BIDS is more than a file format, also
– how to organize multiple recordings, from multiple subjects
– how to document the details of the task, stimuli and responses
– how to document sensor positions
– how to document subject details and demographics
– …
metadata
BIDS for fNIRS, i.e. BEP028?
 Actual raw data in the SNIRF format
 File naming and directory organization according to BIDS
 Metadata according to BIDS
– Tab-separated files
– JSON files
 Some metadata is shared with other modalities in BIDS
– Subject and task details
 Some metadata is fNIRS specific
– Optode configuration (receivers, transmitters)
– Optode positions
– Wavelengths
– …
fNIRS data is usually not recorded in isolation
 The unique selling points for fNIRS are that it is mobile, widely applicable in many
experimental settings, etc.
 In a typical fMRI experiment you only get DICOM files and a presentation log file
– These are the “sourcedata” and combined in a BIDS dataset
 As an example: in an experiment like the PROMPT project from Helena we get
– fNIRS data
– Xsens IMU motion capture data
– Video data (3x)
– Stimulus, response and task data (i.e. triggers and annotations)
– 3D scans with optode positions
– questionnaire data
Example – the PROMPT experimental setup
NIRS
EXP
XSENS
Video @25 Hz
camera1
camera2
camera3
NIRS @50 Hz
Accelerometer @50 Hz
IMU @xx Hz
Audio @44.1 KHz
Trigger @50 Hz
Data management - organizing and converting data
 Phase 1 (organize the recorded files)
– Collect all files from all devices
– Convert files in proprietary formats to open formats (oxy4->oxy3, mvn->c3d)
– Scan the paper lab notes into a pdf file
– Rename all files following BIDS
– Place all files in directory organization following BIDS
 Phase 2a (add the metadata files)
– Extract the timing of the events from each individual recording file as “events.tsv”
according to BIDS
– Determine the relative timing of all recordings to each other and store as ”scans.tsv”
according to BIDS
– Determine the timing of the experimental runs/blocks/trials in each of the recordings
 Phase 2b (minimal pre-processing)
– Annotate the video data (freezing of gate), add it to “events.tsv”
– Determine optode positions from 3D structure sensor scans
– Remove all files with identifying information (video, 3D scans)
 Phase 3 (analyze)
– Share the anonymous data with project collaborators
– Analyze the data
– Publish your results and the anonymous data
this gets archived as the
“source data”
this gets archived as the
“raw BIDS data” and shared
with collaborators
INCOMING
└── sub-03
├── xsens
├── nirs
├── stim
├── quest
├── structuresensor
└── video
├── acq-begin
├── acq-end
└── acq-mobile
SOURCEDATA
├── sub-01
├── sub-02
└── sub-03
├── xsens
│ ├── sub-01_bodydimensions.mvna
│ ├── sub-01_rec-01_take-01_imu.c3d
│ ├── sub-01_rec-01_take-01_imu.mvn
│ ├── sub-01_rec-01_take-02_imu.c3d
│ ├── sub-01_rec-01_take-02_imu.mvn
│ └── ...
├── nirs
│ ├── DAQ
│ │ ├── Screenshot (10).png
│ │ ├── Screenshot (11).png
│ │ └── Screenshot (12).png
│ ├── sub-01_rec-01_nirs.oxy3
│ ├── sub-01_rec-01_nirs.oxy4
│ ├── sub-01_rec-test_nirs.oxy3
│ └── sub-01_rec-test_nirs.oxy4
├── labnotes_and_questionaires
│ ├── sub-01_quest1.xlsx
│ ├── sub-01_quest2.xlsx
│ └── sub-01_labbook.pdf
├── stim
│ ├── sub-01_rec-01_sync-labrecorder.xdf
│ ├── sub-01_rec-01_sync-log.ascii
│ └── sub-01_rec-01_sync-stim.mat
├── structuresensor
│ ├── sub-01_model.jpg
│ ├── sub-01_model.mtl
│ └── sub-01_model.obj
└── video
├── sub-01_rec-01_acq-begin.mp4
├── sub-01_rec-01_acq-end.mp4
└── sub-01_rec-01_acq-mobile.mp4
BIDS_RAW
├── dataset_description.json
├── participants.tsv
├── README
├── sub-01
├── sub-02
└── sub-03
├── scans.tsv
├── xsens
│ ├── sub-01_rec-01_take-01_imu.c3d
│ ├── sub-01_rec-01_take-01_imu.json
│ ├── sub-01_rec-01_take-01_events.tsv
│ └── ...
├── nirs
│ ├── sub-01_rec-01_nirs.oxy3
│ ├── sub-01_rec-01_nirs.json
│ ├── sub-01_rec-01_nirs_events.tsv
│ ├── sub-01_optodepositions.tsv
│ └── ...
├── labnotes
│ └── sub-01_labbook.pdf
└── video
├── sub-01_rec-01_acq-begin_events.tsv
├── sub-01_rec-01_acq-end_events.tsv
└── sub-01_rec-01_acq-mobile_events.tsv
move copy
closed
archive
used for
analysis
Zooming out - The value of BIDS for your fNIRS research
 Following the (pseudo-) BIDS organization and the proposed data management flow, you will
perform your fNIRS analysis on a dataset that is
– Complete
– Well organized
– Re-usable by others (and your “future self”)
 You can develop and test your analysis pipeline on another similarly organized fNIRS
dataset (e.g. pilot measurements with less experimental complexity), i.e. use previous data
to leverage your analysis
 Your analysis pipeline can be reused on future datasets, i.e. use previous analyses to
leverage knowledge in the research team/lab
The Brain Imaging Data Structure
and its use for fNIRS research
--- to be presented at the NIRS toolkit at the Donders ---
Robert Oostenveld
r.oostenveld@donders.ru.nl

The Brain Imaging Data Structure and its use for fNIRS

  • 1.
    The Brain ImagingData Structure and its use for fNIRS research --- to be presented at the NIRS toolkit at the Donders --- Robert Oostenveld r.oostenveld@donders.ru.nl
  • 2.
    What is theBrain Imaging Data Structure  http://bids.neuroimaging.org  https://bids-specification.readthedocs.io  Not a file format, but a way of structuring your data and providing metadata – It specifies which file formats are to be used (i.e. NIfTI, json, tsv) – It specifies the naming convention for files and directories – It addresses the problem of metadata getting lost while doing your research – Details from DICOM headers are lost in converting DICOM to NIfTI – Details about the participants that are not documented digitally – Details about the cognitive task an/or experimental manipulations
  • 3.
    https://xkcd.com/927/ Rather than asa “standard” (see below), you should consider it a widely supported “best practice”
  • 4.
    Brain Imaging DataStructure  BIDS was initiated at Stanford to address the challenges of OpenFMRI.org (now OpenNeuro.org)  Main focus is on “brain” imaging, i.e. neuroimaging, which is often done in cognitive neuroscience  It not only focusses on the imaging aspect – Also on the cognitive part of the research (i.e. behavior) – Also on other measures of activity (i.e. physiology)  In 2016 BIDS was specified for MRI and fMRI, in 2018 also MEG, in 2019 also for EEG and iEEG, and more extensions are in the works  BIDS is used by default at the DCCN for most (f)MRI data and most MEG data  It is a style of research data management (RDM) that you can also use elsewhere – … for modalities that are not in the specification (fNIRS, eyetracker, video, motion capture) – … for data that is not from brain imaging experiments
  • 5.
    An example ofraw data with MRI, MEG and EEG data/README CHANGES dataset_description.json participants.tsv /sub-01/anat/… /sub-01/meg/… /sub-01/eeg/sub-01_task-auditory_eeg.edf /sub-01/eeg/sub-01_task-auditory_eeg.json /sub-01/eeg/sub-01_task-auditory_channels.tsv /sub-01/eeg/sub-01_task-auditory_events.tsv /sub-01/eeg/sub-01_electrodes.tsv /sub-01/eeg/sub-01_coordinates.json Actual EEG data Directory structure Metadata
  • 6.
    Project background  BIDSis the result of the ongoing collaboration of people like you!  BIDS consists of the specification, of tools, and of the communication platforms  The specification is the result of sharing knowledge, discussion, and consensus – Email discussion list – Shared Google docs – GitHub  Well-specified governance structure  BIDS extensions projects are called “BEPs” and have a leader  Steering group – Guimar Niso, Russ Poldrack, Kirstie Whitacker, Melanie Ganz, Robert Oostenveld
  • 7.
    BIDS Extension Proposals,i.e. BEPs  BIDS is an open and growing standard – 2016: fMRI – 2018: MEG – 2019: EEG and iEEG – Soon (2020): PET, ASL, Structutal MR with multiple contrasts – Multiple Contrast MR = BEP001, see here – PET = BEP009, see here – ASL = BEP005, see here – There are (have been) 27 extensions proposals so far (up to BEP027) – Proposals to extend BIDS have to follow certain rules, as explained in the BEP Guide – It has to fit in the bigger picture – It has to represent a wide community consensus
  • 8.
    BIDS for fNIRS,i.e. BEP028?  Benefits of sharing and reusing data are (hopefully) obvious  A common specification – Improves data interoperability and reusability – Improves scientific quality and reproducibility – Facilitates shared tool and pipeline development – Reduces stress, since you don’t have to come up with everything yourself  Society for functional Near Infrared Spectroscopy – http://fnirs.org – fNIRS conferences in Boston (2010), London (2012), Montreal (2014), Paris (2016), Tokyo (2018), Boston (Oct 2020) – Shared Near Infrared Spectroscopy Format (SNIRF) is designed by the community in an effort to facilitate sharing and analysis of NIRS data.
  • 9.
    SNIRF format  Fileformat for NIRS data, like OXY3 or OXY4 from Artinis, or like EDF, CNT, VHDR for EEG  Open format, based on the HDF5 “container” file format with an explicit description of the content and structure  Readers available for MATLAB and Python  HDF5 libraries available for C/C++ and many other languages  BIDS is more than a file format, also – how to organize multiple recordings, from multiple subjects – how to document the details of the task, stimuli and responses – how to document sensor positions – how to document subject details and demographics – … metadata
  • 10.
    BIDS for fNIRS,i.e. BEP028?  Actual raw data in the SNIRF format  File naming and directory organization according to BIDS  Metadata according to BIDS – Tab-separated files – JSON files  Some metadata is shared with other modalities in BIDS – Subject and task details  Some metadata is fNIRS specific – Optode configuration (receivers, transmitters) – Optode positions – Wavelengths – …
  • 11.
    fNIRS data isusually not recorded in isolation  The unique selling points for fNIRS are that it is mobile, widely applicable in many experimental settings, etc.  In a typical fMRI experiment you only get DICOM files and a presentation log file – These are the “sourcedata” and combined in a BIDS dataset  As an example: in an experiment like the PROMPT project from Helena we get – fNIRS data – Xsens IMU motion capture data – Video data (3x) – Stimulus, response and task data (i.e. triggers and annotations) – 3D scans with optode positions – questionnaire data
  • 12.
    Example – thePROMPT experimental setup NIRS EXP XSENS
  • 13.
    Video @25 Hz camera1 camera2 camera3 NIRS@50 Hz Accelerometer @50 Hz IMU @xx Hz Audio @44.1 KHz Trigger @50 Hz
  • 14.
    Data management -organizing and converting data  Phase 1 (organize the recorded files) – Collect all files from all devices – Convert files in proprietary formats to open formats (oxy4->oxy3, mvn->c3d) – Scan the paper lab notes into a pdf file – Rename all files following BIDS – Place all files in directory organization following BIDS  Phase 2a (add the metadata files) – Extract the timing of the events from each individual recording file as “events.tsv” according to BIDS – Determine the relative timing of all recordings to each other and store as ”scans.tsv” according to BIDS – Determine the timing of the experimental runs/blocks/trials in each of the recordings  Phase 2b (minimal pre-processing) – Annotate the video data (freezing of gate), add it to “events.tsv” – Determine optode positions from 3D structure sensor scans – Remove all files with identifying information (video, 3D scans)  Phase 3 (analyze) – Share the anonymous data with project collaborators – Analyze the data – Publish your results and the anonymous data this gets archived as the “source data” this gets archived as the “raw BIDS data” and shared with collaborators
  • 15.
    INCOMING └── sub-03 ├── xsens ├──nirs ├── stim ├── quest ├── structuresensor └── video ├── acq-begin ├── acq-end └── acq-mobile SOURCEDATA ├── sub-01 ├── sub-02 └── sub-03 ├── xsens │ ├── sub-01_bodydimensions.mvna │ ├── sub-01_rec-01_take-01_imu.c3d │ ├── sub-01_rec-01_take-01_imu.mvn │ ├── sub-01_rec-01_take-02_imu.c3d │ ├── sub-01_rec-01_take-02_imu.mvn │ └── ... ├── nirs │ ├── DAQ │ │ ├── Screenshot (10).png │ │ ├── Screenshot (11).png │ │ └── Screenshot (12).png │ ├── sub-01_rec-01_nirs.oxy3 │ ├── sub-01_rec-01_nirs.oxy4 │ ├── sub-01_rec-test_nirs.oxy3 │ └── sub-01_rec-test_nirs.oxy4 ├── labnotes_and_questionaires │ ├── sub-01_quest1.xlsx │ ├── sub-01_quest2.xlsx │ └── sub-01_labbook.pdf ├── stim │ ├── sub-01_rec-01_sync-labrecorder.xdf │ ├── sub-01_rec-01_sync-log.ascii │ └── sub-01_rec-01_sync-stim.mat ├── structuresensor │ ├── sub-01_model.jpg │ ├── sub-01_model.mtl │ └── sub-01_model.obj └── video ├── sub-01_rec-01_acq-begin.mp4 ├── sub-01_rec-01_acq-end.mp4 └── sub-01_rec-01_acq-mobile.mp4 BIDS_RAW ├── dataset_description.json ├── participants.tsv ├── README ├── sub-01 ├── sub-02 └── sub-03 ├── scans.tsv ├── xsens │ ├── sub-01_rec-01_take-01_imu.c3d │ ├── sub-01_rec-01_take-01_imu.json │ ├── sub-01_rec-01_take-01_events.tsv │ └── ... ├── nirs │ ├── sub-01_rec-01_nirs.oxy3 │ ├── sub-01_rec-01_nirs.json │ ├── sub-01_rec-01_nirs_events.tsv │ ├── sub-01_optodepositions.tsv │ └── ... ├── labnotes │ └── sub-01_labbook.pdf └── video ├── sub-01_rec-01_acq-begin_events.tsv ├── sub-01_rec-01_acq-end_events.tsv └── sub-01_rec-01_acq-mobile_events.tsv move copy closed archive used for analysis
  • 16.
    Zooming out -The value of BIDS for your fNIRS research  Following the (pseudo-) BIDS organization and the proposed data management flow, you will perform your fNIRS analysis on a dataset that is – Complete – Well organized – Re-usable by others (and your “future self”)  You can develop and test your analysis pipeline on another similarly organized fNIRS dataset (e.g. pilot measurements with less experimental complexity), i.e. use previous data to leverage your analysis  Your analysis pipeline can be reused on future datasets, i.e. use previous analyses to leverage knowledge in the research team/lab
  • 17.
    The Brain ImagingData Structure and its use for fNIRS research --- to be presented at the NIRS toolkit at the Donders --- Robert Oostenveld r.oostenveld@donders.ru.nl

Editor's Notes

  • #4 BIDS is the brain imaging data STRUCTURE