1 of 58

`

Édouard Delaire, Shahla Bakian Dogaheh, Dr. Giulia Rocco, �Dr. Christophe Grova

2 of 58

Program

2

14:00

15:00

16:00

17:00

14:30

Introduction to NIRSTORM�by Dr. Christophe Grova

Introduction to Brainstorm�and Optimal Montage

15:30

Coffee Break

16:30

fNIRS analysis on the cortical surface

fNIRS analysis at the sensors level: data importation

What’s next in NIRSTORM and Q&A

Learning objective

How to design a fNIRS montage?

How to perform the preprocessing of fNIRS data in NIRSTORM and estimate the hemodynamic response?

fNIRS analysis at the sensors level

How to localize the hemodynamic response on the cortex?

What is the best coffee to get significant results?

Surprise ☺

How to prepare a Brainstorm database for analysis and import functional data in Brainstorm?

Theoretical introduction to fNIRS, optimal montage and fNIRS optical tomography.

3 of 58

Module 0: Setup

3

4 of 58

Setup

4

Data

Link: https://osf.io/md54y/?view_only=0d8ad17d1e1449b5ad36864eeb3424ed

5 of 58

setup

5

Installation of Colin27 template

In the Matlab command window execute: nst_bst_set_template_anatomy('Colin27_4NIRS_Jan19', 0, 1)

Or Copy the zip NIRSTORM_2024/data/Colin27/Colin27_4NIRS.zip to .brainstorm/defaults/anatomy

To locate the .brainstorm folder, enter bst_get('BrainstormUserDir’) in the matlab command window�

Add Cplex to the matlab path

6 of 58

Module 1: Optimal Montage

6

7 of 58

Optimal Montage

7

Montage

Sensitivity of one channel

fNIRS Forward Model

Overall sensitivity of the montage

Sensitivity to the region of interest:�0.096

Sum over the ROI

Source

Detector

Problem: Given a targeted region of interest, and limited resources (#detector, #sources), where should we place the optodes to maximize the montage sensitivity to the region of interest while ensuring maximum local spatial overlap between measurements?

8 of 58

Optimal Montage

8

Anatomical Information�Head model for light propagation modeling

Optodes possible locations on the skin (search space)

Region of Interest

Definition of the constraints to search for an Optimal Montage

Adjacency Number�Minimum number of channels formed for each source

Number of Sources

+

+

+

Number of detectors

Equipment constraint

Distance constraint

Optodes-Optodes distance�[Default: 15 to 40 mm]

+

Source-Detector distance [Default: > 15 mm]

+

Adjacency constraint

9 of 58

Optimal Montage

  • Description: The Target ROI can be defined along the cortical surface as scout in Brainstorm.
  • The Target ROI can be defined in multiple ways:
    • Manually drawn scout on the cortex
    • Using other localizing results (fMRI cluster, EEG/MEG source) stored in Brainstorm database
    • Using an anatomical atlas (Yeo 7 Network, Desikan-Killiany)

9

Region of Interest

Optodes potential �Location

  • Description: Search space: Zone defined on the head covering the possible position for the fNIRS optodes.
  • The region can be defined in multiple ways:
    • Manually drawn scout on the cortex
    • Using all the vertices close to the target region
  • Note on FluenceExclude: NIRSTORM will look at scouts named “FluenceExclude” on the head surface.�FluencesExclude specific regions that should be avoided by the optimal montage (e.g. eyes, ears, EEG)

10 of 58

10

Step 0. Creating a subject

Step 1. Importing the subject anatmy

  • Switch to the "anatomy" view of the protocol. 
  • Right-click on the TutorialNIRS folder � > New subject > Colin27
  • Leave the default options you set for the protocol

11 of 58

Optimal Montage

11

Step 1. Importing the subject anatomy

  1. We need to import the subject anatomy: �This can be a template or the subject-specific anatomy

  • For the template of Colin27, right click on the subject node, then Use template > MNI > Colin27_4NIRS_Jan19

-

12 of 58

Optimal Montage

12

  • Process: nirs > sources > compute optimal montage
  • Input: None

  • Note 1: This process requires Cplex to be added to the Matlab path before hand.

  • Note 2: It seems Cplex is not working on ARM Mac with recent Matlab version ( > 2023b)

Step 2. Computing the optimal montage

13 of 58

Optimal Montage

13

Output Example

Warning: Always make sure that all the weight are relatively in the same order of magnitudes

14 of 58

Optimal Montage

14

Step 3. Evaluating the optimal montage

  • Drag and drop the file ‘Separations’ and use the process nirs > sources > compute head model from fluences

a. Compute the head model

15 of 58

Optimal Montage

15

Step 3. Evaluating the optimal montage

  • Drag and drop the file ‘Separations’ and use the process nirs > sources > Extract sensitivity maps from head model

b. Extract the sensitivity maps

16 of 58

Optimal Montage

16

Step 3. Evaluating the optimal montage

b. Extract the sensitivity maps

fNIRS montage

Light sensitivity map

Summed Light sensitivity map

17 of 58

Optimal Montage

17

Step 4. (Optional) Estimate the optimal montage for each region of interest

18 of 58

Optimal Montage

18

Step 5. (Optional) Export the montage coordinate

19 of 58

Module 2: fNIRS analysis at the sensors level: data importation

19

20 of 58

fNIRS analysis at the sensors level

20

Data importation

Anatomical data

(Recommended)

Functional Data�

Montage Information�

fNIRS data�

1.

2.

0.

Create a new subject�

21 of 58

fNIRS analysis at the sensors level

21

Data importation - Create a new subject

  • Switch to the "anatomy" view of the protocol. 
  • Right-click on the TutorialNIRS folder � > New subject > sub-01 
  • Leave the default options you set for the protocol

22 of 58

fNIRS analysis at the sensors level

  • Note: Make sure to be in the anatomy tab
  • Procedure:
    1. Right-click on the subject node > Import anatomy folder:
    2. Set the file format: Freesurfer + volumes atlases
    3. Select the folder: nirstorm_tutorial_2024/derivatives/FreeSurfer/sub-01
    4. Number of vertices of the cortex surface: 15000 (default value)
    5. Answer "yes" when asked to apply the transformation.
    6. Set the required fiducial points: �Right-click on the MRI viewer > Edit fiducial positions > MRI coordinates, and copy-paste the following coordinates in the corresponding fields. Click [Save] when done.��NAS: 131, 213, 117�LPA: 51, 116, 80�RPA: 208, 117, 86�AC: 131, 128, 130�PC: 129, 103, 124�IH: 133, 135, 176
    7. Once the anatomy is imported, make sure that the surface "mid_15002V" is selected (green). If it is not, right-click on it and select "set as default cortex".
    8. Resample the head mask to get a uniform mesh on the head. For that, right click on head mask and select remesh, then 10242 vertices�

22

Data importation - 1. Anatomical data

23 of 58

23

fNIRS analysis at the sensors level

Database after importation after MRI preprocessing using Freesurfer

MRIs

Volumetric segmentation / Atlas

Head surface

Cortical �and subcortical surfaces

Green = selected surface/volume

24 of 58

fNIRS analysis at the sensors level

  • Open the surface “mid_15002V”
  • Using the Atlas menu, use “Scouts to atlas” to load the file scout_hand.annot

24

Data importation - 1. Anatomical data – Importing ROI

25 of 58

fNIRS analysis at the sensors level

  • Note: Make sure to be in the functional data tab
  • Procedure:
    1. Right-click on the subject node > Review raw file:
    2. Set the file format: NIRS: SNIRF (*.snirf) format
    3. Select the file: nirstorm_tutorial_2024/sub-01/nirs/sub-01_task-tapping_run-01.snirf

25

Data importation - 2. Functional data

Montage information

Data

26 of 58

Module 3: fNIRS analysis at the sensors level

26

27 of 58

fNIRS analysis at the sensors level

27

Pipeline

Raw to delta OD

delta OD to delta Hb

NIROT inverse problem

Legends:

Raw data

 

 

Bad channels detection

Visual review of the data

Motion Correction

Band-pass filtering

Superficial noise removal

using Block Response estimation Averaging

Response estimation�at the channel level

Response estimation�on the cortex

28 of 58

28

Alternative valid pipeline

Raw to delta OD

delta OD to delta Hb

Raw to�delta Hb

Legends:

Raw data

 

Bad channels detection

Visual review of the data

Motion Correction

Band-pass filtering

Superficial noise removal

Response estimation using Block Averaging

fNIRS analysis at the sensors level

29 of 58

fNIRS analysis at the sensors level

  • Process: nirs > pre-process > detect bad channels
  • Input: Raw data
  • Description: �Identify bad channels based on a set of criteria based on data or montage information (separation)
    • Negative value: Channel with negative values
    • Scalp coupling index (SCI): SCI reflects the signal's correlation for each wavelength within the cardiac band. Power reflects the % of the power of the signal within the cardiac band. Remove channels with Low SCI or low power within the cardiac band.
    • Coefficient of variation (CV): reflects the dispersion of data points around the mean. Remove channels with high CV.
    • Saturating channels: Detect and remove channels showing saturation
    • Source-Detector separation: Remove the channels outside the acceptable source-detector distance.
  • Other channels can be either kept or removed

29

Bad Channel Detection

30 of 58

fNIRS analysis at the sensors level

  •  

30

(1) Raw to delta OD, (2) delta OD to delta Hb, (3) Raw to Detla Hb

(1)

(2)

(3)

31 of 58

fNIRS analysis at the sensors level

  • Process: nirs > pre-process > motion correction
  • Input: Raw data, delta OD, or delta Hb
  • Description: �Apply a motion correction algorithm to the data. Two algorigm are implemented: (1) Spline correction (2) Temporal derivative distribution repair (TDDR)
  • Spline correction: After selecting motion manually, spline interpolation is used to smooth the signal during motion.�Parameter:
    • Movement event name: Name used to visually identify the motion
    • Smoothing parameter: Value between 0 and 1 controlling the level of smoothness desired during the motion
  • Temporal derivative distribution repair: automatic motion correction algorithm that relies on the assumption that motion will introduce outliers in the temporal derivative of the optical density.

31

Motion correction

motion

a. Raw signal

b. Signal corrected using spline

c. Signal corrected using TDDR

32 of 58

fNIRS analysis at the sensors level

  • Process: pre-process > band-pass filter
  • Input: delta OD, or delta Hb
  • Description: �Apply a finite impulse response (FIR) filter to the data
  • Parameters:
    • Sensor type: apply the FIR only to selected channels �(useful if storing additional data in the auxiliary channels such as accelerometer, blood pressure …)
    • Lower-cutoff / Upper-Cutoff: Cuttoff frequency for the filter
    • Transition band: Error margin for the filter before/after the cutoff. �Warning: it is important to specify this parameter for fNIRS data. Use the View filter response button to ensure that the design filter corresponds to what you desire.
    • Stopband attenuation: Gain of the filter outside of the transition band.
    • Filter version: Version of the brainstorm implementation of the filter�(We recommend to keep 2019 unless you have a good reason to use an outdated implementation)

32

Band-pass filtering

33 of 58

fNIRS analysis at the sensors level

  • Process: (1) nirs > pre-process > band-pass filter� (2) nirs > pre-process > remove slow fluctuations
  • Input: Raw data, delta OD, or delta Hb
  • Description: �Apply an infinite impulse response (IIR) filter to the data (1) or detrend the data using polynomial or discrete cosine transformation (DCT) (2)
  • Parameters:
    • IIR band-pass filter (1) :
      • See brainstorm FIR filter
    • Detrend (2)
      • Trend modelization: Polynomial (a) or DCT (b)
      • (if using DCT): Minimum period removes fluctuation with a period larger than this period (or signal with a frequency lower than the inverse of this frequency)
      • (if using Polynomial): Polynomial order. Order of the polynomial used to detrend the signal. 1 is removing the mean and a linear trend. Can be coupled with a high-pass filter (IIR or FIR)

    • If applied on raw data, make sure to check the box ‘keep the mean’, to not remove the mean of the signal (necessary for the raw to dOD conversion)

33

Alternative to Brainstorm FIR Band-pass filter

34 of 58

fNIRS analysis at the sensors level

  • Process: nirs > pre-process > remove superficial noise
  • Input: delta OD, or delta Hb
  • Description: ��Remove superficial noise using the mean of the short-separation channels
  • Parameters:
    • Method to select short-channel: �(1) based on Name: manually specify the name of the short-channels (eg. S1D17, S2D17…)�(2) based on Source-Detector distance: use the Source-Detector distance to detect short-separation channels.
    • (if 1) Superficial channels: list of short separation channels
    • (if 2) Separation threshold; maximum Source-Detector distance to be considered as short-channel
    • Baseline: Segment of the signal used to calibrate the superficial noise removal procedure. Select a windows relatively free of motion. Mainly useful for long-duration signals, or if a part of your signal is heavily corrupted with motion.

34

Superficial noise removal

35 of 58

fNIRS analysis at the sensors level

35

Response estimation using Block Averaging

Pre-processed signal

Block #1�

Import in�database

Block #2�

Block #2�

Block #2�

Block #2�

Block #2�

Block #2�

Block #20�

Visual review*

Block #1�

Block #2�

Block #2�

Block #17�

Block #2�

Block #20�

Average

Averaged hemodynamic response

* Removing block with period marked as motion in the previous steps

Average: Average > Average File

36 of 58

fNIRS analysis at the sensors level

36

Response estimation using Block Averaging

37 of 58

Module 4: fNIRS analysis on the cortical surface

37

38 of 58

fNIRS analysis at the sensors level

38

Pipeline

Raw to delta OD

delta OD to delta Hb

NIROT inverse problem

Legends:

Raw data

 

 

Bad channels detection

Visual review of the data

Motion Correction

Band-pass filtering

Superficial noise removal

using Block Response estimation Averaging

Response estimation�at the channel level

Response estimation�on the cortex

39 of 58

Data Analysis | On the cortex

39

Anatomical Information�Head model for light propagation modeling

Head Model

Optical density at the channel level

+

Optical density on the cortex

MBLL

[HbO], [HbR], [HbT] on the cortex

40 of 58

Data Analysis | On the cortex

40

1. Estimating the forward model

Required Information

Anatomical Information�Head model for light propagation modeling

Montage Information�Coordinate of the montage, coregistered with the subject anatomy

Pipeline

  1. Estimate Volume to a Surface interpolator (Voronoï interpolation)
  2. Estimate volumetric fluence for each optode
  3. Estimate the head model by projecting the fluences on the cortex

41 of 58

Data Analysis | On the cortex

41

0. Estimate or Import tissues segmentation

  • Description: ��NIRSTORM requires a segmentation of the MRI into 5 tissues ( Skin, CSF, Grey matter, and White matter). �Segmentation can be imported (1) or estimated within Brainstorm (2)
  • Procedure:
    • (1) To import computed,
      • Right-click on the subject node > Import MRI
      • Set the file format: Volume atlas (subject space)
      • Select the file nirstorm_tutorial_2024/derivatives/segmentation/sub-01/segmentation_5tissues.nii

(1)

(2)To estimate the segmentation within Brainstorm:

    • right-click on the MRI, then
    • MRI segmentation > SPM12 or Cat12.�
  • For more information, consult Brainstorm�segmentation tutorials

42 of 58

Data Analysis | On the cortex

42

  1. Estimate Volume to a Surface interpolator (Voronoï interpolation)

Brainstorm database

  • Process: nirs > Sources > compute Voronoï volume to cortex interpolator
  • Input: NONE
  • Description: �Compute interpolator from the default MRI (in green) to the default cortical surface (in green) using Voronoï diagram interpolation scheme that is anatomically informed by the underlying anatomical sulco-gyral geometry [1]

[1] Grova et al, NeuroImage, 2006

43 of 58

Data Analysis | On the cortex

43

  1. Estimate volumetric fluences

44 of 58

Data Analysis | On the cortex

44

  1. Estimate volumetric fluences
  • Monte Carlo eXtreme (MCX) is a fast physically-accurate photon simulation software for 3D heterogeneous complex media.
  • Integrated within Brainstorm as plugin.
  • Two options:
    • MCXlab-cuda: Version of MCXlab running on GPU�Fast but requires a CUDA-capable graphics card with properly configured CUDA drivers
    • Mcxlab-cl: Version of MCXlab using open-cl. Slower than MCXlab-cuda but can run on almost all modern CPU / GPU. �(works on ARM Mac since March 2024)
  • Plug-in must be loaded before starting any computation

45 of 58

Data Analysis | On the cortex

45

  1. Estimate volumetric fluences (nirs > sources > compute fluences)

46 of 58

Data Analysis | On the cortex

46

  1. Estimate head model from fluences
  • Process: nirs > sources > compute head model from fluences
  • Input: raw, delta OD
  • Description: ��Compute the head model from volumetric fluences.
  • Parameters: �
    • Fluence data: path to the fluence
    • Smoothing method: Method used to smooth the head model after the projection from volume to the cortex
    • Spatial smoothing: Amount of smoothing to apply

47 of 58

Data Analysis | On the cortex

47

  1. Investigating the light sensitivity of the montage
  • Drag and drop the file ‘Separations’ and use the process nirs > sources > Extract sensitivity maps from head model

48 of 58

Data Analysis | On the cortex

48

  1. Investigating the light sensitivity of the montage

Montage Sensitivity:

  • Sensitivities: Sensitivity map for each channel
  • Summed sensitivities: Overall sensitivity map of the montage

Measure of spatial overlap between fNIRS channels:�a threshold must first be set, considering either the minimum number of channels sensitive to a specific cortical region or the minimum sensitivity required to receive signals from that region

  • Overlap (overlap):
    • when specifying a threshold on the expected minimum light sensitivity, the algorithm reports for each vertex how many channels are sensitive to this specific vertex (above the specified threshold)
  • Overlap (sensitivity):
    • When setting the threshold to the expected minimum number Nc of channels sensitive to a region, NIRSTORM reports, for each vertex, the minimum sensitivity achieved by the Nc most sensitive channels

49 of 58

Data Analysis | On the cortex

49

fNIRS inverse problem using MNE

  • Process: nirs > sources > source reconstruction - wMNE
  • Input: delta OD (averaged optical density)
  • Description: Solve the fNIRS inverse problem using a depth-weighted version of Minimum Norm Estimate (MNE)
  • Parameters:
    • Reconstruction Field of View: set of vertices on the cortex used for the reconstruction (defined as all the vertex close to the montage)
    • Depth-weighting factor: the amount of depth weighting applied for MNE between 0, no depth-weighting, and 1: maximum depth weighting. Recommended: 0.3
    • Reconstruction Time-windows: windows of the signal to reconstruct on the cortex
    • Baseline Time window: the signal window used to estimate the signal noise covariance (if Compute noise covariance of the baseline MNE is checked). If Compute noise covariance of the baseline MNE is not checked, then the noise covariance is modeled as identity (not recommended)

50 of 58

Data Analysis | On the cortex

50

MNE

51 of 58

Data Analysis | On the cortex

51

fNIRS inverse problem using MEM

52 of 58

Data Analysis | On the cortex

52

fNIRS inverse problem using MEM

a. Use nirs > sources > Compute sources:: BEst

b. Set the time window for the data and baseline

c. In detail, change the weight for MNE and MEM to 0.3

53 of 58

Data Analysis | On the cortex

53

MEM

54 of 58

Module 5: What’s next in NIRSTORM and Q&A

54

55 of 58

What’s next in NIRSTORM

55

Multimodal integration

Waveletet based MEM for�longue-duration recording

56 of 58

Documentation

56

57 of 58

How to contribute

57

Add new functionalities

Publish use-case NIRSTORM analysis on your data

58 of 58

Questions ?

58