This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

8.5.11. nilearn.image.largest_connected_component_img


Return the largest connected component of an image or list of images.

New in version 0.3.1.

imgsNiimg-like object or iterable of Niimg-like objects (3D)

Image(s) to extract the largest connected component from. See

3D Niimg-like object or list of

Image or list of images containing the largest connected component.


Handling big-endian in given Nifti image This function changes the existing byte-ordering information to new byte order, if the dtype in given Nifti image has non-native data type. This operation is done internally to avoid big-endian issues with scipy ndimage module.