Brainstorm
  • Comments
  • Menu
    • Attachments
    • Versions
    • Raw Text
    • Print View
  • Login

Software

  • Introduction

  • Gallery

  • Download

  • Installation

Users

  • Tutorials

  • Forum

  • Courses

  • Community

  • Publications

Development

  • What's new

  • What's next

  • About us

  • Contact us

  • Contribute

Revision 55 as of 2025-09-16 00:06:33
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

PET processing

Authors: Diellor Basha, Raymundo Cassani

Contents

  1. Introduction
  2. Requirements
  3. Import the anatomy
  4. Import and pre-process the PET volume
  5. Masking and rescaling PET
  6. Surface-based analysis
  7. Partial Volume Correction
  8. Scripting

Introduction

This tutorial describes how to process and analyze Positron Emission Tomography (PET) data within Brainstorm and how to extend PET data to surface-based, multimodal analysis. It guides users through importing and pre-processing PET volumes and outlines steps for volume and surface-based analysis of cortical tracer uptake values.

PET is a powerful imaging technique widely used in medical and scientific research to study metabolic and functional processes in the brain and body. PET processing involves a series of computational and analytical steps to transform raw data into meaningful visualizations and quantitative insights. The increasing availability of multimodal datasets that combine PET, MRI and M/EEG provide unique opportunities for integrated analysis of neurophysiology, brain structure and molecular processes mapped by PET radioligands.

This page provides an overview of the essential methods, tools, and considerations involved in PET processing, aiming to support both newcomers and experienced users of Brainstorm. If you are new to Brainstorm, refer to the comprehensive introductory materials in Brainstorm introduction tutorials to familiarize yourself with the layout and workflow in Brainstorm.

Method Overview

Brainstorm capabilities for PET support: importing, processing, registering, visualizing, and analyzing PET data. Brainstorm PET functionality and workflow are designed to facilitate the analysis of multimodal neuroimaging data by allowing the user to co-analyze MEG, PET and MRI-derived data. Multi-frame (4D) PET volumes are realigned during import and aggregated over time from the 4D image (i.e. across n frames) to obtain a single 3D volume for co-registration with the subject’s structural MRI. The aggregated and co-registered 3D volume is then masked and rescaled to obtain voxel-wise standardized uptake value ratios (SUVR) which are then projected to the cortical surface.

Requirements

Prerequisites:

  • Brainstorm Installation: Ensure you have a working copy of Brainstorm installed on your computer.

  • SPM12 (Statistical Parametric Mapping): required for realignment of dynamic (4D) PET volumes and co-registration of PET with MRI. This can be installed as Brainstorm plugin

  • Download the dataset:

    • Go to the Brainstorm Download page, and download the file: tutorial_pet_processing.zip.

Files in dataset

tutorial_pet_processing/

  • anatomy/: Result of the FreeSurfer 7.4.1 segmentation for Subject01 structural MRI (anatomy/mri/T1.mgz). See * Using Freesurfer for more details about computing Freesurfer reconstructions from Brainstorm.

  • pet/: PET data for Subject01

    • 18FNAV4694.nii.gz: Raw PET data taken over 6 acquisition frames, with uptake values for beta-amyloid tracer 18FNAV4694

    • 18Fflortaucipir.nii.gz: Raw PET data taken over 4 acquisition frames, with uptake values for tau tracer 18Fflortaucipir

Import the anatomy

  • Start Brainstorm
  • Select the menu File > Create new protocol. Name it "TutorialPET" and select the options:
    "No, use individual anatomy",
    "No, use one channel file per acquisition run".

Reference MRI

  • Go to the Anatomy view

  • Right-click on the pet_processing top node > New subject > Subject01.
    Keep the default options you defined for the protocol.

  • Switch to the Anatomy view of the protocol.

  • Import the Subject MRI and its precomputed FreeSurfer segmentation. Right-click on the subject node > Import anatomy folder (auto), choose Freesurfer + Volume atlases + Thickness from the file type menu and select the precomputed anatomy folder. This will import the structural MRI (MRI T1), the available anatomical parcellations and the surfaces obtained with FreeSurfer.

  • import_mrifs.png

Import and pre-process the PET volume

The MRI volume will be used as the anatomical reference for this subject. We will now import two PET scans acquire from the same subject and process the raw PET data.

pet_method_import.png

  • Right-click on the subject node > Import PET.
    Select: 18FNAV4694.nii.gz

  • Choose Yes for the transformation for MRI orientation.

  • Choose the import options for PET

  • Align frames: For multi-frame (dynamic) volumes, realignment is recommended before aggregation and registration to MRI. Brainstorm checks automatically whether the imported file is a 3D (single-frame) or 4D (multi-frame) scan and makes available the option for realignment accordingly (greyed out if single-frame). In this step, individual PET frames are first aligned to a chosen target frame (the first) and then realigned in a second pass to the mean of all frames available in the volume. In this case, 18FNAV4694.nii.gz is a 4D (dynamic) structure, containing a PET scan with 6 acquisition frames, taken minutes apart.
    Check this option

  • Apply smoothing: This option applies Gaussian smoothing to uptake values in each PET frame before frames are aggregated into a single 3D volume. The size of the smoothing parameter is the full width at half maximum (FHWM) of the smoothing function, given in mm. Smoothing at this stage can exacerbate partial fraction effects, whereby non-specific tracer binding from white matter and low uptake in cerebrospinal fluid (CSF) can contaminate the cortical signal. In some cases with low-resolution PET scans, smoothing at this step may be necessary to improve registration to MRI. We recommend skipping smoothing at this stage and smoothing instead on the surface at later steps during surface-based processing described below.
    Uncheck this option or set FWHM to 0 mm.

  • Aggregate frames: This option lets you choose how the realigned frames will be aggregated to produce the time-aggregated, single-frame 3D volume.
    Select mean

  • Register to MRI using: The PET volume to be imported needs to be registered to the reference MRI in order to align tracer uptake values to the corresponding anatomy. It is a necessary step for both volume and surface-based analysis of tracer uptake. Refer to the CT2MRI tutorial for detailed explanation of the two co-registration methods: SPM and MNI.
    Check this option, and set method to SPM

  • Reslice volume: This option resamples the PET volume to match the slice sampling of the reference MRI. It is a necessary step for overlaying PET slices to their on the reference MRI. If you know that your imported PET volume is already co-registered and resliced to the reference MRI, select No for this option. For the current dataset, we will reslice the volume.
    Check this option

  • pet_import_workflow2.png

You can also decide to not perform any of these actions (realign and aggregate frames, and co-register and reslice the imported volume), and perform them once the PET volume is imported using the PET volume context menus:
pet_process_context_menu_lowres.png

Once processing and importing is completed, the file 18FNAV4694_spm_realign_mean_spm_reslice will appear in the database, and the MRI viewer will open automatically, displaying the PET volume as an overlay over the reference MRI. The default colormap of the PET overlay can be modified by right-clicking on the figure and selecting from the popup menu. Use the viewer to explore the PET data and to verify that co-registration and pre-processing was done accurately. In addition, use the Amplitude slider in the Surface panel, as it thresholds the displayed values.

Repeat the above steps for the second PET file 18Fflortaucipir.nii.gz, , this PET volume contains 4 acquisition frames.

Masking and rescaling PET

The imported PET volumes will now appear in the Brainstorm tree view under its own PET icon with PET-specific context menus. To compute the standardized uptake value ratio (SUVR), we will rescale PET uptake values with respect to a reference region such as the cerebellum. As this is a ROI-based method, accurate parcellation of the volume is required before proceeding. In this dataset, the anatomical parcellation is already computed with FreeSurfer. However, it is possible to compute tissue segmenation and anatomical parcellations from the MRI file within Brainstorm. For detailed tutorials, refer to MRI segmentation in https://neuroimage.usc.edu/brainstorm/Tutorials/#Advanced_tutorials


pet_method_process.png

  • Go to the Anatomy view

  • Right-click on the 18Fflortaucipir_spm_realign_mean_spm_reslice node > PET processing > Compute SUVR.

  • Atlas: These are anatomical parcellations, aka atlases, available for the reference MRI. Select ASEG to use the FreeSurfer parcellation.

  • Reference ROI: This is the brain region from the atlas that will be used as a reference for rescaling PET values to obtain the SUVR. Select Cerebellum from the drop down menu.

  • Apply mask: The rescaled PET data can be masked to restrict PET values to a chosen ROI mask. Select Cortex from the drop down menu.

  • Project to surface: This option allows you to project cortical PET values to the default cortical surface of the Subject for surface-based analysis.

  • pet_process_workflow.png

Surface-based analysis

The surface-based submodule enables the projection of volumetric PET data onto the cortical surface, facilitating vertex-wise analysis in a common subject framework. Surface-based analysis of PET is based on the tess2mri interpolation matrix computed by Brainstorm. This matrix establishes weights for volumetric MRI voxels contributing to specific vertices on the cortical surface. Weights range between 0 (no contribution) and 1 (full contribution), enabling a smooth mapping of voxel coordinates to the cortical surface. Given that PET data are co-registered to the MRI, PET voxel intensity values are scaled by the interpolation weights, resulting in a weighted projection of PET values to the nearest vertex.

depth_weighted_mapping.png

Partial Volume Correction

Related tutorials

  • Import the subject anatomy

Articles

  • PET Analysis with Freesurfer

  • PET Analysis with Freesurfer Tutorial

Forum discussions

  • Overlaying PET on cortex: https://neuroimage.usc.edu/forums/t/30241

Scripting

The following script from the Brainstorm distribution reproduces the analysis presented in this tutorial page: brainstorm3/toolbox/script/tutorial_pet_processing.m

1 function tutorial_pet_processing(tutorial_dir, reports_dir) 2 % TUTORIAL_INTRODUCTION: Script that run the PET processing tutorial 3 % 4 % INPUTS: 5 % - tutorial_dir : Directory where the tutorial_pet_processing.zip file has been unzipped 6 % - reports_dir : Directory where to save the execution report (instead of displaying it) 7 8 % @============================================================================= 9 % This function is part of the Brainstorm software: 10 % https://neuroimage.usc.edu/brainstorm 11 % 12 % Copyright (c) University of Southern California & McGill University 13 % This software is distributed under the terms of the GNU General Public License 14 % as published by the Free Software Foundation. Further details on the GPLv3 15 % license can be found at http://www.gnu.org/copyleft/gpl.html. 16 % 17 % FOR RESEARCH PURPOSES ONLY. THE SOFTWARE IS PROVIDED "AS IS," AND THE 18 % UNIVERSITY OF SOUTHERN CALIFORNIA AND ITS COLLABORATORS DO NOT MAKE ANY 19 % WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF 20 % MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, NOR DO THEY ASSUME ANY 21 % LIABILITY OR RESPONSIBILITY FOR THE USE OF THIS SOFTWARE. 22 % 23 % For more information type "brainstorm license" at command prompt. 24 % =============================================================================@ 25 % 26 % Authors: Raymundo Cassani, 2025 27 % Diellor Basha, 2025 28 29 30 % ===== FILES TO IMPORT ===== 31 % Output folder for reports 32 if (nargin < 2) || isempty(reports_dir) || ~isdir(reports_dir) 33 reports_dir = []; 34 end 35 % You have to specify the folder in which the tutorial dataset is unzipped 36 if (nargin == 0) || isempty(tutorial_dir) || ~file_exist(tutorial_dir) 37 error('The first argument must be the full path to the dataset folder.'); 38 end 39 % Subject name 40 SubjectName = 'Subject01'; 41 % Build the path of the files to import 42 AnatDir = fullfile(tutorial_dir, 'tutorial_pet_processing', 'anatomy'); 43 Pet1File = fullfile(tutorial_dir, 'tutorial_pet_processing', 'pet', '18FNAV4694.nii.gz'); 44 Pet2File = fullfile(tutorial_dir, 'tutorial_pet_processing', 'pet', '18Fflortaucipir.nii.gz'); 45 % Check if the folder contains the required files 46 if ~file_exist(Pet1File) || ~file_exist(Pet2File) 47 error(['The folder ' tutorial_dir ' does not contain the folder from the file tutorial_pet_processing.zip.']); 48 end 49 % Re-inialize random number generator 50 if (bst_get('MatlabVersion') >= 712) 51 rng('default'); 52 end 53 54 55 %% ===== 1. CREATE PROTOCOL ==================================================== 56 % ============================================================================= 57 disp([10 'DEMO> 1. Create protocol' 10]); 58 % The protocol name has to be a valid folder name (no spaces, no weird characters...) 59 ProtocolName = 'TutorialPET'; 60 % Start brainstorm without the GUI 61 if ~brainstorm('status') 62 brainstorm nogui 63 end 64 % Delete existing protocol 65 gui_brainstorm('DeleteProtocol', ProtocolName); 66 % Create new protocol 67 gui_brainstorm('CreateProtocol', ProtocolName, 0, 0); 68 % Start a new report 69 bst_report('Start'); 70 71 72 %% ===== 2. IMPORT ANATOMY ===================================================== 73 % ============================================================================= 74 disp([10 'DEMO> 2. Import anatomy' 10]); 75 % Process: Import FreeSurfer folder 76 bst_process('CallProcess', 'process_import_anatomy', [], [], ... 77 'subjectname', SubjectName, ... 78 'mrifile', {AnatDir, 'FreeSurfer+Thick'}, ... 79 'nvertices', 15000); 80 [sSubject, iSubject] = bst_get('Subject', SubjectName); 81 MriFile = sSubject.Anatomy(sSubject.iAnatomy).FileName; 82 hFigMri = view_mri(MriFile); 83 bst_report('Snapshot', hFigMri); 84 pause(0.5); 85 close(hFigMri); 86 87 88 %% ===== 3. IMPORT AND PROCESS PET VOLUMES ================================= 89 % ============================================================================= 90 disp([10 'DEMO> 2. Import and process PET volumes' 10]); 91 PetFiles = {Pet1File, Pet2File}; 92 for iPet = 1 : length(PetFiles) 93 % Process: Import PET 94 bst_process('CallProcess', 'process_import_mri', [], [], ... 95 'subjectname', SubjectName, ... 96 'voltype', 'pet', ... % PET 97 'comment', '', ... 98 'mrifile', {PetFiles{iPet}, 'Nifti1'}); 99 % Imported PET (last volume) 100 sSubject = bst_get('Subject', SubjectName); 101 impPetFile = sSubject.Anatomy(end).FileName; 102 % Align and aggregate PET volume 103 PetAggFile = mri_realign(impPetFile, 'spm_realign', 0, 'mean'); 104 % Co-register and reslice PET volume 105 PetAggCoregFile = mri_coregister(PetAggFile, MriFile, 'spm', 1); 106 % Compute SUVR, and project to surface 107 [PetSuvrFile, ~, suvrSurfFile] = pet_process(PetAggCoregFile, 'ASEG', 'Cortex', 'Brainmask', 1, 1); 108 109 % Figure: Aligned, aggregated, co-registered PET overlayed on MRI 110 hFigPetOvr = view_mri(MriFile, PetAggCoregFile); 111 bst_report('Snapshot', hFigPetOvr); 112 pause(0.5); 113 close(hFigPetOvr); 114 % Figure: SUVR volume 115 hFigPetSuvr = view_mri(MriFile, PetSuvrFile); 116 bst_report('Snapshot', hFigPetSuvr); 117 pause(0.5); 118 close(hFigPetSuvr); 119 % Figure: SUVR projected to surface 120 hFigSurfSuvr = view_surface_data([], suvrSurfFile); 121 bst_report('Snapshot', hFigSurfSuvr); 122 pause(0.5); 123 close(hFigSurfSuvr); 124 end 125 126 127 %% ===== SAVE REPORT ===== 128 % Save and display report 129 ReportFile = bst_report('Save', []); 130 if ~isempty(reports_dir) && ~isempty(ReportFile) 131 bst_report('Export', ReportFile, reports_dir); 132 else 133 bst_report('Open', ReportFile); 134 end





Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01