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.

7.5.10. nilearn.image.largest_connected_component_img


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

New in version 0.3.1.

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

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

img or list of img 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.