.. currentmodule:: nilearn

.. include:: names.rst

0.10.4
======

**Released April 2024**

HIGHLIGHTS
----------

- :bdg-dark:`Code` Use the appropriate HTML templates for :class:`nilearn.maskers.MultiNiftiMapsMasker` and :class:`nilearn.maskers.MultiNiftiLabelsMasker` reports that would lead to empty reports for ``MultiNiftiMapsMasker`` (:gh:`4310` by `Rémi Gau`_).

- :bdg-dark:`Code` Fix color bar handling with color map with only 1 level (:gh:`4255` by `Rémi Gau`_).

- :bdg-dark:`Code` Improve colorbar size and labels in mosaic display (:gh:`4284` by `Rémi Gau`_).

- :bdg-dark:`Code` Remove unused ``**kwargs`` from :func:`nilearn.plotting.view_img` and :func:`nilearn.plotting.plot_surf` (:gh:`4270` by `Rémi Gau`_).


Fixes
-----

- :bdg-dark:`Code` Fix plotting of carpet plot due to a change in the coming version of matplotlib (3.9.0) (:gh:`4279` by `Rémi Gau`_).

- :bdg-dark:`Code` Fix errant warning when using ``stat_type`` in :func:`nilearn.glm.compute_contrast` (:gh:`4257` by `Eric Larson`_).

- :bdg-dark:`Code` Fix when thresholding is applied to images by GLM reports (:gh:`4258` by `Rémi Gau`_).

- :bdg-dark:`Code` Use the appropriate HTML templates for :class:`nilearn.maskers.MultiNiftiMapsMasker` and :class:`nilearn.maskers.MultiNiftiLabelsMasker` reports that would lead to empty reports for ``MultiNiftiMapsMasker`` (:gh:`4310` by `Rémi Gau`_).

- :bdg-dark:`Code` Make masker report tables horizontally scrollable (:gh:`4308` by `Rémi Gau`_).

- :bdg-dark:`Code` Masker reports tables do not overlap with report image (:gh:`4308` by `Rémi Gau`_).

- :bdg-dark:`Code` Fix color bar handling with color map with only 1 level (:gh:`4255` by `Rémi Gau`_).

- :bdg-dark:`Code` Ensure that ``region_names_`` can be generated by :meth:`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 (:gh:`4274` by `Rémi Gau`_).

- :bdg-dark:`Code` Ensure that :func:`nilearn.interfaces.bids.save_glm_to_bids` serializes numpy arrays to :obj:`list` used as GLM parameters before saving them to JSON (:gh:`4325` by `Rémi Gau`_).

- :bdg-dark:`Code` Check that the ``view`` parameter in surface plotting functions is a pair of ``int`` or ``float`` when it is not a ``string`` (:gh:`4297` by `Rémi Gau`_).

- :bdg-dark:`Code` Fix positions of the markers on the images on the sphere masker reports (:gh:`4285` by `Rémi Gau`_).

- :bdg-dark:`Code` Fix cut position in nifti maps maskers to match displayed map maximum (:gh:`4304` by `Rémi Gau`_).

- :bdg-dark:`Code` Make sure that :class:`nilearn.maskers.NiftiSpheresMasker` reports displays properly when it contains only 1 sphere (:gh:`4269` by `Rémi Gau`_).

- :bdg-dark:`Code` Miscellaneous fixes in GLM reports (only display FIR delay if FIR is used, display color bar "Z score" legend...) (:gh:`4266` by `Rémi Gau`_).

- :bdg-primary:`Doc` Fix minor typos in documentation (glossary and connectivity/parcellating) (:gh:`4343` by `Florent Pollet`_).

- :bdg-primary:`Doc` Update minor information on the :ref:`contributing` page (:gh:`4318` and :gh:`4320` by `Himanshu Aggarwal`_).

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

- :bdg-success:`API` Add an ``avg_method`` parameter to :func:`nilearn.plotting.plot_surf_stat_map` (:gh:`4298` by `Rémi Gau`_).

- :bdg-primary:`Doc` Advertise nilearn's in built globbing capability in an example (:gh:`4334` by `Himanshu Aggarwal`_).


Changes
-------

- :bdg-dark:`Code` Throw warnings when passing parameters to surface plotting functions that are not used by the plotly engine (:gh:`4298` by `Rémi Gau`_).

- :bdg-dark:`Code` Improve colorbar size and labels in mosaic display (:gh:`4284` by `Rémi Gau`_).

- :bdg-dark:`Code` Change the colormap to ``gray`` for the background image in the :class:`nilearn.maskers.NiftiSpheresMasker` (:gh:`4269` by `Rémi Gau`_).

- :bdg-dark:`Code` Remove unused ``**kwargs`` from :func:`nilearn.plotting.view_img` and :func:`nilearn.plotting.plot_surf` (:gh:`4270` by `Rémi Gau`_).

- :bdg-dark:`Code` Use red to blue color map in the GLM reports (:gh:`4266` by `Rémi Gau`_).

- :bdg-dark:`Code` :class:`nilearn.maskers.NiftiSpheresMasker` will throw warnings if the ``labels`` passed to it is not a :obj:`list` of :obj:`str`, or if the number of items in the list of labels does not match the number of regions in the label image (:gh:`4274` by `Rémi Gau`_).

- :bdg-dark:`Code` Copy headers from user-specified image to the result of :func:`nilearn.image.math_img` (:gh:`4337` by `Himanshu Aggarwal`_).

- :bdg-primary:`Doc` Render the description of the templates, atlases and datasets of the :mod:`nilearn.datasets` as part of the documentation (:gh:`4232` by `Rémi Gau`_).

- :bdg-primary:`Doc` Render examples of GLM and masker reports as part of the documentation (:gh:`4267` and :gh:`4295` by `Rémi Gau`_).

- :bdg-secondary:`Maint` HTML, CSS are now linted using prettier. (:gh:`4302`,  by `Rémi Gau`_).
