How to (cluster-) threshold a parcellated statistical image?

Hi all,

I have a statistical image containing 376 brain regions. I would like to threshold this image to obtain regions of interest that have particular high values in comparison to the rest of the brain. The problem is that functions like nilearn.image.threshold_image or nilearn.image.threshold_stats_img all assume that I have voxel-wise values and not atlas parcels. However, the logic of a cluster-threshold would also apply to parcels if I am not completely mistaken?

Does anyone knows how to do this? We could for example just tweak this example and parcellate the statistical image first to create the problem:

from nilearn import datasets
from nilearn.maskers import NiftiLabelsMasker
from nilearn.plotting import plot_stat_map
from nilearn import datasets

localizer = datasets.fetch_neurovault_auditory_computation_task()
tmap_filename = localizer.images[0]

# lets fetch an atlas and parcellate the tmap
labels_img = datasets.fetch_atlas_harvard_oxford("cort-maxprob-thr25-2mm").maps
masker = NiftiLabelsMasker(labels_img=labels_img)

# parcellate the statistical image and bring the parcellated data back into
# 3D-Format
tmap_data_parcellated = masker.fit_transform(tmap_filename)
tmap_parcellated = masker.inverse_transform(tmap_data_parcellated)

The statistical map would then look like this:


and not like this:


I am not sure I understand you concern. The parcellated image still has values in each voxel, hence you can do whatever thresholding / region extraction you want on it ?

Hi Bertrand,

I realized that I probably have two questions. I think the second question could go beyond this topic (I will open a separate thread for that and ping you there). However they are both connected as at some point I would have to solve them both to correctly threshold my image.

First question: I would like to respect clusters in my statistical image somehow (aka. don’t treat each parcel as an independent observation but also look at what’s going on around it). But I am unsure if I can use the cluster_threshold argument in functions like nilearn.glm.threshold_stats_img for that since this would operate on a voxel level and not on a parcel-level? A parcellated image contains sets of voxels that all have the same value. But the cluster thresholding algorithm would not know about this a-priori structure if I am not mistaken? Instead it would treat each voxel as an independent observation without “knowing” about these a-priori covariance groups / sets of voxels that all have the same value?

Hi @JohannesWiesner,

I think this assumption is incorrect. The assumptions of random field theory that guide the way we usually do whole-brain statistical methods (including clustering) would not be applicable to your case. Clustering is built around the idea that an effect should be distributed among neighboring units since the units are small (in most cases, voxels). Your parcels are so big that there is no reason to suspect any effect would be distributed across neighboring parcels.

I am not sure I understand why you would not want to treat parcels as independent. What is the motivation behind the dependence of parcels?


Hi Stephen, interesting question! I guess this is somehow of theoretical nature? People like Matthew Glasser would propose that you can think of even higher order hierarchies as just the classical voxel → area hierarchy. See this link for example. They would argue, that voxels can be assigned to 360 areas, which again can be assigned to 22 regions which again can be assigned to 7 cortices. If we stick to this assumption then cluster-thresholding would also be a valid approach for statistical images that have parcel-wise values I guess? See this wonderful handmade drawing that I made:


Even though the left blob has a higher value than the others on the right, couldn’t you apply the same logic as with voxel-cluster-threshold and say “I trust a parcel value more if the surrounding neighbors of that parcel also have similar values and therefore the parcel on the left must be an outlier”? That is: just having a high value is not enough to mark something as a true positive. We trust a value more if surrounding parcels also have similar values.

Would be interesting to get your opinion on that!