Pre-requisites
The following software should be available on your system:
- Matlab (The Mathworks, USA)
- SPM2, SPM5, or SPM8 (University College London, UK)
- Matlab Optimization Toolbox (optional)
The WSPM toolbox is implemented and maintained by Dimitri Van De Ville. The underlying theoretical framework was developed together with Michael Unser and Thierry Blu, initially at the Biomedical Imaging Group (EPFL). The main contribution of WSPM is to combine wavelet thresholding/denoising with voxel-wise statistical hypothesis testing.
These pages introduce the WSPM toolbox (wavelet-based SPM). After checking the pre-requisites, you can go on to download and install the toolbox. To understand how to use the toolbox, feel free to follow the example.
The following software should be available on your system:
Before installing WSPM, check that
The installation of WSPM is very similar to most other SPM toolboxes:
We demonstrate the use of the WSPM toolbox through a case study. For that purpose, we use the 'single subject epoch auditory' data of G. Rees and K. Friston, which can be downloaded. These data were acquired on a 2T Siemens Magneton, 7s repetition time, 64x64x64 volumes with voxels of physical size 3mm x 3mm x 3mm. The block length was 6 volumes (42s) where the condition alternates between rest and auditory stimulation (bi-syllabic words presented binaurally at a rate of 60 per minute). The total number of volumes was 96, but the first 12 volumes are advised to discard due to T1 effects. This leaves us with 84 volumes or equivalently 14 cycles of 12 volumes.
In what follows, we assume that the current MATLAB directory is where the data is located. Before we can use the toolbox, we need to do a complete standard SPM analysis since we need at least one t-contrast to be available. Here, we perform a basic analysis only (realignment, smoothing, GLM).
1. Standard SPM analysis
We will use the 'batch' interface of SPM to create a pipeline including all pre-processing steps and then run all steps in one go.
1.1 Spatial preprocessing
During preprocessing, the functional data will be realigned (fM00*.img → rfM00*.img), coregistered to the structural scan, the structural scan will be segmented (sM0023_002.img; c1sM0023_002.img, c2sM0023_002.img, msM0023_002.img), both the structural and functional data will be normalised (wmsM0023_002.img, wrfM00*.img), and the functional data smoothed (swrfM00*.img).
For more information on the parameters chosen, please check chapter 28 of the SPM8 manual. For parameters that are not mentioned below, we use the default values.
spm fmri
to start SPM and select 'Batch' in the main SPM windowSave the designed batch and click the green arrow to run all pre-processing steps
1.2 Model specification, review and estimation
Before starting the analysis, we create a new folder (e.g. 'analysis') in the current MATLAB directory, next to the folders 'fM00223' and 'sM00223', to save the results.
Save the designed batch and click the green arrow to run the model specification, review and estimation
1.3 Inference: create a t contrast
Select the 'Results' option from the 'Inference' menu in the main SPM window
Select the previously created 'SPM.mat' file in the 'analysis' folder'
Select the 'Define new contrast' option in the 'SPM contrast manager' window
Name: 'T'
Type: 't-contrast'
Contrast: Enter '1 0' or only '1'
Select 'OK', pick the newly defined contrast in the contrast menu and select 'Done'
Apply masking: 'none'
Title for comparison: 'activation'
P value adjustment to control: 'FWE'
P value (FWE): 0.05
& extend threshold {voxels}: 0
Hit enter and SPM will display the results. To superimpose the functional activations on the subject’s anatomy, select ‘overlays’ in the visualisation section of the interactive window and choose ‘sections’ in the pulldown menu. Select the normalised anatomical volume wmsM00223_002
Next, we can use the WSPM toolbox to obtain results using the spatio-wavelet framework for one of the t-contrasts available.
2. WSPM analysis
2.1 Prepare data for a desired wavelet transform
Select the 'WSPM' option from the 'Toolboxes' submenu
Select the 'SPM.mat' file
Select action: choose 'Estimate (DWT+GLM)'
Select the volumes wrfM00223_016 to wrfM00223_099 (84 in total), so the non-smoothed ones!
Subsampling scheme: 'dyadic'
Transform type: '2D+Z'
Redundancy: 'Multiple'
Wavelet flavor: 'ortho'
Degree (XY-plane): 1
Number of iterations: 1
The toolbox computes the wavelet transform of all the volumes. There will also change the structure SPM in the 'SPM.mat' file; i.e., a substructure SPM.Wavelet is extended. You can compute as many transforms as you want.
2.2 Generate results
Select the 'WSPM' option from the 'Toolboxes' submenu
Select the 'SPM.mat' file
Select action: choose ‘Results (contrast)’
Select the wavelet transform: done automatically if only one available (in our example: zm*ortho,1/0,1)
Select test: done automatically if only one available (in our example: {T}: T)
Mask: 'Default'
Type 1 error control: 'Strong (Corrected Bonferroni)'
P value (significance level): '0.05'
The toolbox computes the results according to the spatio-wavelet framework and adds a traditional SPM contrast to the SPM structure.
2.3 Display results
Select the 'Results' option from the 'Inference' menu
Select the 'SPM.mat' file
Select the newly added contrast
Apply masking: 'none'
Title for comparison: hit enter (in our example 'T SIG(0.050) T(5.88) WAV(zm*ortho,1.0,1)'
P value adjustment to control: 'none'
Threshold {T or p value}: 5.88; you need to put the value that is available in the contrast title as T(XXX). This threshold value ensures that the corresponding p value is the one in the contrast title behind SIG, e.g. 0.05, using the type 1 error control you chose earlier
& extent threshold {voxels}: 0
Hit enter and SPM will display the results: WSPM guarantees a good type-I-error control because of the Bonferroni correction and there is thus strong evidence for the detected activations. Additionally, the activation patterns are more refined since the functional images are not smoothed prior to the analysis.
Naming convention for the wavelet transform:
For example: 'zm*ortho,1/0,1' stands for slice-by-slice symmetric orthogonal B-spline wavelet transform of degree 1, multiple redundancy, 1 decomposition level.
Naming convention for the contrasts: