Machine learning for NeuroImaging in Python
Released April 2024
Use the appropriate HTML templates for nilearn.maskers.MultiNiftiMapsMasker and nilearn.maskers.MultiNiftiLabelsMasker reports that would lead to empty reports for MultiNiftiMapsMasker (#4310 by Rémi Gau).
Fix color bar handling with color map with only 1 level (#4255 by Rémi Gau).
Improve colorbar size and labels in mosaic display (#4284 by Rémi Gau).
Remove unused **kwargs from nilearn.plotting.view_img and nilearn.plotting.plot_surf (#4270 by Rémi Gau).
Fix plotting of carpet plot due to a change in the coming version of matplolib (3.9.0) (#4279 by Rémi Gau).
Fix errant warning when using stat_type in nilearn.glm.compute_contrast (#4257 by Eric Larson).
Fix when thresholding is applied to images by GLM reports (#4258 by Rémi Gau).
Use the appropriate HTML templates for nilearn.maskers.MultiNiftiMapsMasker and nilearn.maskers.MultiNiftiLabelsMasker reports that would lead to empty reports for MultiNiftiMapsMasker (#4310 by Rémi Gau).
Make masker report tables horizontally scrollable (#4308 by Rémi Gau).-
Masker reports tables do not overlap with report image (#4308 by Rémi Gau).
Fix color bar handling with color map with only 1 level (#4255 by Rémi Gau).
Ensure that region_names_ can be generated by nilearn.maskers.NiftiSpheresMasker.transform_single_imgs for deterministic atlases that use floats or non-consecutive values as region_ids whether they include background in their labels or not (#4274 by Rémi Gau).
Ensure that nilearn.interfaces.bids.save_glm_to_bids serializes numpy arrays to list used as GLM parameters before saving them to JSON (#4325 by Rémi Gau).
Check that the view parameter in surface plotting functions is a pair of int or float when it is not a string (#4297 by Rémi Gau).
Fix positions of the markers on the images on the sphere masker reports (#4285 by Rémi Gau).
Fix cut position in nifti maps maskers to match displayed map maximum (#4304 by Rémi Gau).
Make sure that nilearn.maskers.NiftiSpheresMasker reports displays properly when it contains only 1 sphere (#4269 by Rémi Gau).
Miscellaneous fixes in GLM reports (only display FIR delay if FIR is used, display color bar “Z score” legend…) (#4266 by Rémi Gau).
Fix minor typos in documentation (glossary and connectivity/parcellating) (#4343 by Florent Pollet).
Update minor information on the Code of Conduct page (#4318 and #4320 by Himanshu Aggarwal).
Add an avg_method parameter to nilearn.plotting.plot_surf_stat_map (#4298 by Rémi Gau).
Advertise nilearn’s in built globbing capability in an example (#4334 by Himanshu Aggarwal).
Throw warnings when passing parameters to surface plotting functions that are not used by the plotly engine (#4298 by Rémi Gau).
Improve colorbar size and labels in mosaic display (#4284 by Rémi Gau).
Change the colormap to gray for the background image in the nilearn.maskers.NiftiSpheresMasker (#4269 by Rémi Gau).
Remove unused **kwargs from nilearn.plotting.view_img and nilearn.plotting.plot_surf (#4270 by Rémi Gau).
Use red to blue color map in the GLM reports (#4266 by Rémi Gau).
nilearn.maskers.NiftiSpheresMasker will throw warnings if the labels passed to it is not a list of str, or if the number of items in the list of labels does not match the number of regions in the label image (#4274 by Rémi Gau).
Copy headers from user-specified image to the result of nilearn.image.math_img (#4337 by Himanshu Aggarwal).
Render the description of the templates, atlases and datasets of the nilearn.datasets as part of the documentation (#4232 by Rémi Gau).
Render examples of GLM and masker reports as part of the documentation (#4267 and #4295 by Rémi Gau).
HTML, CSS are now linted using prettier. (#4302, by Rémi Gau).
contrast_type
by stat_type
by @larsoner in https://github.com/nilearn/nilearn/pull/4257
two_sided
parameter of binarize_img
function by @NicolasGensollen in https://github.com/nilearn/nilearn/pull/4262
int
or float
when not a string
by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4297
avg_method
to plot_surf_stat_map
by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4298
resampling_target = None
for nifti label maskers by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4336
glm.first_level.first_level_from_bids
by @michellewang in https://github.com/nilearn/nilearn/pull/4352
doc/visual_testing/reporter_visual_inspection_suite.py
for older Matplotlib versions by @michellewang in https://github.com/nilearn/nilearn/pull/4353
math_img
by @man-shu in https://github.com/nilearn/nilearn/pull/4337
Full Changelog: https://github.com/nilearn/nilearn/compare/0.10.3...0.10.4
Released January 2024
[!WARNING]
Support for python 3.7 has been dropped. We recommend moving to python >= 3.11.
Minimum supported versions of packages have been bumped up:
- Numpy – v1.19.0
- SciPy – v1.8.0
- Scikit-learn – v1.0.0
- Nibabel – v4.0.0
- Pandas – v1.1.5
- Joblib – v1.0.0
API Allow passing arguments to first_level_from_bids to build first level models that include specific set of confounds by relying on the strategies from load_confounds (#4103 by Rémi Gau).
Support passing t and F contrasts to compute_contrast that that have fewer columns than the number of estimated parameters. Remaining columns are padded with zero (#4067 by Rémi Gau).
NiftiSpheresMasker now has generate_report method (#3102 by Yasmin Mzayek and Nicolas Gensollen).
Update the CompCor strategy in load_confounds and load_confounds_strategy to support fmriprep 21.x series and above. (#3285 by Hao-Ting Wang).
Allow setting vmin in plot_glass_brain and plot_stat_map (#3993 by Michelle Wang).
When plotting thresholded statistical maps with a colorbar, the threshold value(s) will now be displayed as tick labels on the colorbar (##2833 by Nicolas Gensollen).
Combine GLM examples plot_fixed_effect and plot_fiac_analysis into a a single example plot_two_runs_model (#3191 by Taylor Salo and Rémi Gau).
MultiNiftiMasker can now call generate_report which will generate a report for the first subject in the list of subjects (#4001 by Yasmin Mzayek).
Make sure that all atlases and datasets fetchers return a description (#4215 Rémi Gau).
Update the CompCor strategy in load_confounds and load_confounds_strategy to support fmriprep 21.x series and above. (#3285 by Hao-Ting Wang).
Fix SimpleRegressionResults to accommodate for the lack of a model attribute (#4071 Rémi Gau)
clean_img can now use kwargs clean__sample_mask argument to correctly reshape the nifti image to the dimensions of the mask in the output (#4051 by Mia Zwally).
Fix plotting of an image with color bar when maximum value is exactly zero (#4204 by Rémi Gau).
Code Fix PSC normalisation method applied by standardize_signal in signal (#4116 by Hao-Ting Wang and Yasmin Mzayek).
Fixed inheritance of decoder classes to keep compatibility with scikit-learn>v1.3 (#4188 by Yasmin Mzayek).
Make sure that all the fetchers for atlas and func from nilearn.datasets return a sklearn.utils.Bunch. Add new behavior to fetch_language_localizer_demo_dataset to return output as Bunch. This behavior will become the default in version 0.13.0 (#4233 by Rémi Gau).
NiftiSpheresMasker now has generate_report method (#3102 by Yasmin Mzayek and Nicolas Gensollen).
Allow passing Pandas Series of image filenames to SecondLevelModel (#4070 by Rémi Gau).
Allow passing arguments to first_level_from_bids to build first level models that include specific set of confounds by relying on the strategies from load_confounds (#4103 by Rémi Gau).
Support passing t and F contrasts to compute_contrast that that have fewer columns than the number of estimated parameters. Remaining columns are padded with zero (#4067 by Rémi Gau).
Multi-subject maskers’ generate_report method no longer fails with 5D data but instead shows report of first subject. User can index input list to show report for different subjects (#3935 by Yasmin Mzayek).
Allow global_signal parameter in load_confounds_strategy in denoise_strategy='compcor' (#4225 by Hao-Ting Wang).
Add two_sided option for binarize_img (#4121 by Steven Meisler).
generate_report now uses appropriate cut coordinates when functional image is provided (#4099 by Yasmin Mzayek and Nicolas Gensollen).
Mention the classification type (all-vs-one) in Decoding of a dataset after GLM fit for signal extraction (#4122 by Tamer Gezici).
Add backslash to homogenize Parcellations documentation (#4042 by Nikhil Krish).
Specify full form of LSS in Beta-Series Modeling for Task-Based Functional Connectivity and Decoding (#4141 by Tamer Gezici).
Don’t fetch tmaps in examples if tmaps aren’t used in the example. (#4136 by Christina Roßmanith).
Describe the return value in fetch_abide_pcp documentation (#4159 by Suramya Pokharel).
Allow setting vmin in plot_glass_brain and plot_stat_map (#3993 by Michelle Wang).
When plotting thresholded statistical maps with a colorbar, the threshold value(s) will now be displayed as tick labels on the colorbar (##2833 by Nicolas Gensollen).
Expose scipy CubicSpline extrapolate parameter in clean to control the interpolation of censored volumes in both ends of the BOLD signal data (#4028 by Jordi Huguet).
Make nilearn.reporting._get_clusters_table module public and move copy_img out of nilearn._utils.niimg (#4166 by Rémi Gau).
Private utility context manager write_tmp_imgs is refactored into function write_imgs_to_path (#4094 by Yasmin Mzayek).
Move user facing function concat_niimgs out of private module nilearn._utils.niimg_conversions (#4167 by Rémi Gau).
Remove leading underscore from non private functions to align with PEP8 (#4086 by Rémi Gau).
Make decoding/proximal_operator explicitly private to align with PEP8 (#4153 by Rémi Gau).
Make private functions public when used outside of their module nilearn.interface to align with PEP8 (#4168 by Rémi Gau).
img_to_signals_labels will also return masked_atlas in release 0.15. Meanwhile, use return_masked_atlas parameter to enable/disable this behavior. (#3761 by Mohammad Torabi).
cation Rename the parameter contrast_type in compute_contrast and attribute contrast_type in Contrast to stat_type (#4191 by Rémi Gau).
plot_surf_roi will raise a warning if roi_map contains negative or non-integer values; in version 0.13 this will be a ValueError (#4131 by Michelle Wang).
nilearn.datasets.fetch_bids_langloc_dataset will be deprecated in release 0.13 as it returns data simuilar to fetch_language_localizer_demo_dataset (#4219 by Rémi Gau).
the default parameter of fd_threshold and std_dvars_threshold in load_confounds with be updated to match fmriprep default in version 0.13 (#4225 by Hao-Ting Wang).
Combine GLM examples plot_fixed_effect and plot_fiac_analysis into a a single example plot_two_runs_model (#3191 by Taylor Salo and Rémi Gau).
Switch to using tox to manage environments during development and testing. All plotting python dependencies (matplotlib AND plotly) are now installed when running pip install nilearn[plotting] (#4029 by Rémi Gau).
MultiNiftiMasker
to use generate_report
method by @ymzayek in https://github.com/nilearn/nilearn/pull/4001
vmin
in plot_glass_brain
and plot_stat_map
by @michellewang in https://github.com/nilearn/nilearn/pull/3993
http://
to https://
by @DimitriPapadopoulos in https://github.com/nilearn/nilearn/pull/4050
np.random.RandomState()
- part 1 by @ymzayek in https://github.com/nilearn/nilearn/pull/4052
0.1.0.post1
for windows by @ymzayek in https://github.com/nilearn/nilearn/pull/4101
write_tmp_imgs
function and use it with pytest's tmp_path
by @ymzayek in https://github.com/nilearn/nilearn/pull/4094
find_parcellation_cut_coords
function by @ymzayek in https://github.com/nilearn/nilearn/pull/4107
img_plotting
by @ymzayek in https://github.com/nilearn/nilearn/pull/4115
NiftiLabelsMasker
's transform
output by @mtorabi59 in https://github.com/nilearn/nilearn/pull/3761
NiftiSpheresMasker
reports by @NicolasGensollen in https://github.com/nilearn/nilearn/pull/3102
plot_surf_roi
by @michellewang in https://github.com/nilearn/nilearn/pull/4131
nilearn.datasets._utils.fetch_file
to nilearn.datasets._utils.fetch_single_file
by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4156
__all__
and API doc more consistent by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4157
plot_surf
by @ymzayek in https://github.com/nilearn/nilearn/pull/4164
nilearn._utils.data_gen
by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4171
second_level_contrast
of non_parametric_inference
by @ymzayek in https://github.com/nilearn/nilearn/pull/4150
contrast_type
to stat_type
by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4191
nilearn.plotting
used outside of their module public by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4197
test_clean_psc
by @paul-reiners in https://github.com/nilearn/nilearn/pull/4208
session
by run
to align with BIDS terminology by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4214
Full Changelog: https://github.com/nilearn/nilearn/compare/0.10.2...0.10.3
Released September 2023
plotting.plot_img
now have an optional radiological
parameter, defaulting to False
. If True
, this will invert the x-axis and L
and R
annotations to confirm to radiological conventional view..LogisticRegressionCV
.LassoCV
as a new estimator option for Decoder objectsvmin
and symmetric_cbar
arguments to nilearn.plotting.plot_img_on_surf
.contrasts
allowing fixed effects on F contrastsplotting.plot_img
now have an optional radiological
parameter, defaulting to False
. If True
, this will invert the x-axis and L
and R
annotations to confirm to radiological conventional view..transform_imgs
of maskers.MultiNiftiMapsMasker
and maskers.MultiNiftiLabelsMasker
that would raise an error if a list of sample_mask
was specified to fit_transform
.nilearn.plotting.surf_plotting._plot_surf_matplotlib
that would make vertices transparent when saving in PDF or SVG format.symmetric_cmap=True
or the avg_method
argument with plotting.plot_surf_roi
.glm.first_level.first_level_from_bids
that returned no confound files if the corresponding bold files contained derivatives BIDS entities.glm.first_level.first_level_from_bids
that would throw a warning about slice_time_ref
not being provided even when it was.cv_params_
attribute of fitter Decoder objects sometimes had missing entries if grid_param
is a sequence of dicts with different keys.nilearn.interfaces.fmriprep.load_confounds
confounds file selection more generic.nilearn.interfaces.fmriprep.load_confounds
confounds selection on cosine
as not all confound files contained the variables.pathlib.Path
not being counted as Niimg-like object in image.new_img_like
.fit_transform
behavior to match when fit
method is passed image dataplotting.plot_surf_contours
so that ROI contours are rendered clearlydatasets.fetch_atlas_craddock_2012
, datasets.fetch_atlas_smith_2009
and datasets.fetch_atlas_basc_multiscale_2015
fetchers including using API consistent maps
keyLogisticRegressionCV
.glm.first_level.first_level_from_bids
when using event.tsv files with no trial type column.datasets.fetch_atlas_surf_destrieux
.LassoCV
as a new estimator option for Decoder objectsvmin
and symmetric_cbar
arguments to nilearn.plotting.plot_img_on_surf
.generate_report
method of maskers by allowing users to pass a cmap argument for plotting imagecontrasts
allowing fixed effects on F contrastsnilearn.glm.first_level.experimental_paradigm.check_events
will now throw a warning if some events have a 0 second duration and will throw an error if an event has NaN
onset or duration.mask_img
in maskers.NiftiLabelsMasker
will no longer be kept in release 0.15. Meanwhile, use keep_masked_labels
parameter when initializing the maskers.NiftiLabelsMasker
object to enable/disable this behavior..mask_img
in maskers.NiftiMapsMasker
will no longer be kept in release 0.15. Meanwhile, use keep_masked_maps
parameter when initializing the maskers.NiftiMapsMasker
object to enable/disable this behavior..darkness
in surf_plotting._compute_facecolors_matplotlib
and html_surface._get_vertexcolor
~nilearn.plotting.html_surface._mix_colormaps
to cm.py
in nilearn.plotting
~nilearn.glm.regression
standardize
in plotting.plot_carpet
and connectome.ConnectivityMeasure
to handle "zscore" deprecation.sphx_glr_auto_examples_01_plotting_plot_prob_atlas.py
is shortened to speed up build timeDecoder.cv_params_
when param_grid
is a list of dicts with different keys by @michellewang in https://github.com/nilearn/nilearn/pull/3733
cobre
, nyu
) by @michellewang in https://github.com/nilearn/nilearn/pull/3743
_sanitize_reorder
to match regex in test by @Remi-Gau in https://github.com/nilearn/nilearn/pull/3751
InvalidParameterError
message by @ymzayek in https://github.com/nilearn/nilearn/pull/3763
surf_plotting
function by @mathdugre in https://github.com/nilearn/nilearn/pull/3860
load_confounds.
by @htwangtw in https://github.com/nilearn/nilearn/pull/3863
LassoCV
to nilearn.decoding.DecoderRegressor
by @michellewang in https://github.com/nilearn/nilearn/pull/3781
plot_matrix
function by @ymzayek in https://github.com/nilearn/nilearn/pull/3899
vmin
argument to plotting.plot_img_on_surf
by @michellewang in https://github.com/nilearn/nilearn/pull/3873
plot_glass_brain
by @ymzayek in https://github.com/nilearn/nilearn/pull/3924
standardize
parameter in function signatures to allow handling of deprecation by @ymzayek in https://github.com/nilearn/nilearn/pull/3927
colorscale
by @ymzayek in https://github.com/nilearn/nilearn/pull/3945
sample_mask
in MultiNiftiMapsMasker.fit_transform
by @acionca in https://github.com/nilearn/nilearn/pull/3971
event_type
instead of trial_type
by @Remi-Gau in https://github.com/nilearn/nilearn/pull/3986
maps
key for API consistency and improve deprecation for new behavior of some atlas fetchers by @ymzayek in https://github.com/nilearn/nilearn/pull/3987
alltrue
deprecation by @ymzayek in https://github.com/nilearn/nilearn/pull/3996
compute_fixed_effects
by @bthirion in https://github.com/nilearn/nilearn/pull/3203
dev
in sphinx directives related to version by @Remi-Gau in https://github.com/nilearn/nilearn/pull/4013
Full Changelog: https://github.com/nilearn/nilearn/compare/0.10.1...0.10.2