You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Me and @Remi-Gau found out that a couple of nilearn atlases may benefit from some standardization and some of them even have inconsistencies.
Specifically:
Schaefer atlas:
the region names list is in byte string format, it'd be better if they were in string format
labels_img is filled with float values instead of integers, i.e. region ids are float numbers.
AAL atlas:
the region ids (the numbers filling the labels_img) start from 2001 instead of 1 and are not consecutive numbers
Destrieux atlas:
The number of region names (151) does not match with the number of region ids (148), i.e. there are regions that do not exist in labels_img even without masking or resampling
region names are a list of tuples like (id, name) instead of being only a string containing the name of the region.
Moreover, it seems the list of region names in all atlases includes "background" except AAL and Schaefer. For some atlases the name considered for background is different, e.g. "bg" or "Background"
Even though working on this should fix #4330 and #4331, it will change what it returned by some of the fetchers (some even if not an API change, it would be a behavior change that should probably go through a deprecation cycle - not 100% about this).
For example, the Destrieux fetcher would return 'labels' as list of strings and not a numpy.recarray containing the names of the ROIs.
So this feels like a bit of an "invasive" change to include into 0.10.4 that should be a bug fix release. So I suggest making that change after 0.10.4 is out.
Note that the list of labels should also include "background" (or "Background")
Was checking on the templateFlow atlases and not all of them explicitly includes "background" in their list of labels so I would not make this required for Nilearn list of labels (for example by throwing an error if a user passed a list of labels to NiftiLabelMasker that did not include "background").
going through the deprecation cycle would involve warning users about the changes for a few releases before actually introducing them
Yes exactly we usually have deprecation warnings for 2 releases before the deprecation comes in effect. So if the a "breaking" change appears in 0.11, people's code will still "work" until 0.13 but they will get a warning that should tell them what to do to not adapt their code.
Is there an existing issue for this?
Operating system
Operating system version
Mac OS Version 13.4
Python version
nilearn version
0.10.3
Expected behavior
Me and @Remi-Gau found out that a couple of nilearn atlases may benefit from some standardization and some of them even have inconsistencies.
Specifically:
labels_img
is filled with float values instead of integers, i.e. region ids are float numbers.labels_img
) start from 2001 instead of 1 and are not consecutive numberslabels_img
even without masking or resamplingMoreover, it seems the list of region names in all atlases includes "background" except AAL and Schaefer. For some atlases the name considered for background is different, e.g. "bg" or "Background"
@Remi-Gau feel free to add to the list
Current behavior & error messages
NA
Steps and code to reproduce bug
NA
The text was updated successfully, but these errors were encountered: