Dear Carole,

our TAPAS PhysIO Toolbox can do so. It is integrated with SPM, so you can just use the Batch Editor to specify a dependency from the segmentation output to PhysIO to generate the regressors from the tissue probability masks for CSF and WM, and the preprocessed fMRI time series.

The parameters are best documented in the Batch Editor itself, but what you are looking for is the “Noise ROIs” model part, which can implement an aCompCor-like extraction of principal components of noise on top of just the mean time series.

Have a look here for details about the toolbox installation:

or the accompanying paper for modelling details:, section 2.6.2. Data-driven noise models.

I hope that helps,
Lars Kasper, PhD
Translational Neuromodeling Unit / 
MR Technology and Methods Group

Institute for Biomedical Engineering
University of Zurich & ETH Zurich

Wilfriedstrasse 6 / Gloriastrasse 35
8032 Zurich / 8092 Zurich

phone: + 41 44 634 91 09 / +41 44 632 09 68
e-mail: [log in to unmask]

On 8 Feb 2019, at 01:00, SPM automatic digest system <[log in to unmask]> wrote:

Date:    Thu, 7 Feb 2019 08:50:52 +0000
From:    Carole Guedj <[log in to unmask]>
Subject: Regress out WM and CSF average signal

Dear SPM user's,

I was wondering if there is an easy way to create (nuisance) regressors from WM and CSF signals.

I'm actually looking for a matlab/spm script that can extract CSF and WM signal from the output mask of the segmentation step and then average the timecourse across all voxels in the mask. The final purpose is to enter the regressor files into a 1st level analysis along with e.g. movement regressors.

Many thanks in adavance for any help.