.. currentmodule:: nilearn

.. include:: names.rst

0.11.1
======

**Released december 2024**

HIGHLIGHTS
----------

- Fixes some critical bugs introduced in 0.11.0.

- Adds a :obj:`~nilearn.maskers.SurfaceMapsMasker` class.

- Allows to run :obj:`~nilearn.regions.Parcellations` with surface data.

Fixes
-----

- :bdg-dark:`Code` Fix issue to lead to user path to not be expanded when trying to load nifti images (:gh:`4948` by `Rémi Gau`_).

- :bdg-dark:`Code` Allow using ``confounds`` and ``sample_mask`` via ``.fit_transform`` in :obj:`~nilearn.maskers.SurfaceLabelsMasker` (:gh:`4926` by `Himanshu Aggarwal`_).

- :bdg-dark:`Code` Allow to fit :obj:`~nilearn.maskers.SurfaceMasker` on list of surface images even if the masker instance already contains a mask (:gh:`4975` by `Rémi Gau`_).

- :bdg-dark:`Code` Allow extracting only positive regions by adding ``two_sided`` parameter to :obj:`~nilearn.regions.RegionExtractor`.  (:gh:`4849` by `Hande Gözükan`_).

- :bdg-dark:`Code` Ensure that low alpha values in :func:`~plotting.plot_img_on_surf` do not cause color values to be above 1 (:gh:`4906` by `Paul Bogdan`_).

- :bdg-dark:`Code` Fix all occurrences of the RUF012 error related to mutable default values in Python classes (:gh:`4954` by `Idrissa Traore`_).

- :bdg-dark:`Code` Support for confounds as numpy arrays in :meth:`nilearn.glm.first_level.FirstLevelModel.fit` (:gh:`4967` by `Rémi Gau`_).

- :bdg-dark:`Code` Update :obj:`~nilearn.regions.HierarchicalKMeans` to take X as array of shape ``[n_samples, n_features]`` (:gh:`4939` by `Himanshu Aggarwal`_ and `Rémi Gau`_).

Enhancements
------------

- :bdg-dark:`Code` Allow pathlike type for ``design matrix`` in :obj:`~nilearn.plotting.plot_design_matrix` and :obj:`~nilearn.plotting.plot_design_matrix_correlation`, as well as for ``model_event`` in :obj:`~nilearn.plotting.plot_event` (:gh:`4807` by `Rémi Gau`_).

- :bdg-dark:`Code` Ensure that ``design matrix`` and / or ``events`` can be pathlike objects in :meth:`nilearn.glm.first_level.FirstLevelModel.fit`, :meth:`nilearn.glm.second_level.SecondLevelModel.fit`, :meth:`~nilearn.glm.first_level.make_first_level_design_matrix`  (:gh:`4807` by `Rémi Gau`_).

- :bdg-dark:`Code` Implement :obj:`~nilearn.maskers.SurfaceMapsMasker` class to extract signals from surface maps (:gh:`4830` by `Himanshu Aggarwal`_).

- :bdg-dark:`Code` Allow :obj:`~nilearn.regions.Parcellations` to work with Surface data (:gh:`4756` by `Himanshu Aggarwal`_).

- :bdg-primary:`Doc` Add a :ref:`page <meaning_difference>` in the user guide to explain GLM terminology across software (Nilearn, SPM, FSL) regarding the meaning of 'levels'  (:gh:`4287` by `Thiti Premrudeepreechacharn`_).
