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.
Crops img as much as possible
Will crop img, removing as many zero entries as possible without touching non-zero entries. Will leave one voxel of zero padding around the obtained non-zero area in order to avoid sampling issues later on.
img: Niimg-like object