VectleSkillsWhy does my denoised fMRI look like white noise after XCP-D or nilearn clean_img

Why does my denoised fMRI look like white noise after XCP-D or nilearn clean_img

Export

Explains why denoised fMRI output (XCP-D desc-denoised_bold or nilearn clean_img) can look like white noise: temporal filtering and confound regression remove the temporal mean, and nilearn z-scores each voxel by default, erasing anatomical contrast from snapshots. Use when a denoised BOLD volume or temporal-mean image looks noisy but the input looked fine. Does not apply to all-zero or NaN outputs, crashed runs, or upstream fMRIPrep failures.

TL;DR

Your data is almost certainly fine. Denoising and temporal filtering remove the temporal mean and slow drift, and nilearn clean_img additionally z-scores every voxel time series by default, so a single volume or temporal-mean image of the denoised data has no anatomical contrast left and looks like white noise. Check the 4D time series itself or the temporal standard-deviation map instead; both should show coherent structure.

Step 1 - confirm what you are looking at

Make sure the file is the denoised 4D BOLD (for example the XCP-D desc-denoised_bold file) and that you are viewing one volume or the temporal mean. A temporal mean near zero everywhere is the expected signature of filtered data, not of broken data.

Step 2 - scroll the 4D series

Play through the time series. You should see spatially coherent intensity fluctuations, with resting-state networks co-fluctuating, even though any single frame looks noisy.

Step 3 - look at the temporal standard-deviation map

import nibabel as nib
img = nib.load("sub-XX_task-rest_desc-denoised_bold.nii.gz")
data = img.get_fdata()
std_map = data.std(axis=-1)
nib.save(nib.Nifti1Image(std_map, img.affine), "temporal_std.nii.gz")

Success check: the std map shows the brain with anatomical structure (ventricles and gray matter brighter). If it does, the denoised data is fine.

Step 4 - nilearn: keep the mean for display

nilearn.image.clean_img detrends and standardizes each voxel by default. For visualization, turn standardization off and add the mean image back:

import nibabel as nib
import numpy as np
from nilearn.image import clean_img
bold = nib.load("sub-XX_task-rest_desc-preproc_bold.nii.gz")
cleaned = clean_img(bold, t_r=2.0, low_pass=0.1, high_pass=0.01, smoothing_fwhm=6.0, standardize=False)
cdata = cleaned.get_fdata()
cdata += bold.get_fdata().mean(axis=-1, keepdims=True)
nib.save(nib.Nifti1Image(cdata, bold.affine), "cleaned_with_mean.nii.gz")

Success check: the saved file shows anatomy again while keeping the filtered fluctuations.

Step 5 - XCP-D: trust the QC outputs, not snapshots

Check the XCP-D executive summary and carpet plots rather than raw volume snapshots.

When this applies

  • Denoised or filtered BOLD (XCP-D desc-denoisedbold, nilearn cleanimg output) looks like noise in a viewer
  • You applied temporal filtering, confound regression, detrending, or standardization
  • The input (fMRIPrep preproc) image looked anatomical

When this does not apply

  • The output file is all zeros or NaN, or the run crashed: that is genuinely broken data
  • fMRIPrep itself failed (bad registration, empty brain mask): fix upstream first
  • You opened a confound regressor file instead of the denoised BOLD

Compatibility

XCP-D 0.10.x (pennlinc/xcpd), nilearn 0.10 and newer cleanimg, fMRIPrep 23 and newer BOLD derivatives. The explanation itself is version-independent.

Variant phrasings

  • xcp-d output looks like noise
  • denoised bold looks like white noise
  • clean_img output has no anatomical detail

Root cause

Anatomical contrast in a BOLD volume comes from the temporal mean and low-frequency signal (T2* weighting, coil profiles, drift). Temporal filtering and confound regression remove exactly that, and standardization additionally forces every voxel to temporal mean 0 and variance 1. What remains is the fluctuation around the mean, which in any single frame looks like noise. BrainVoyager most likely displayed the data with the mean retained, which is why the same steps looked anatomical there.

Edge cases

  • If the temporal std map is structured inside the brain mask but flat outside it, all is well; if it is zero everywhere, the file is empty.
  • Spatial smoothing does not restore the mean; it only blurs the noise.
  • A 0.01-0.1 Hz band-pass on resting-state data is standard; the noise look is not a sign of over-aggressive filtering.

Provenance: drafted from public thread https://neurostars.org/t/white-noise-style-output-of-xcp-d/36440

Provenance

Resolved from the public thread: https://neurostars.org/t/white-noise-style-output-of-xcp-d/36440

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 9, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 7, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Why+does+my+denoised+fMRI+look+like+white+noise+after+XCP-D+or+nilearn+clean_img&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.