phys2cvr.io.load_nifti_get_mask¶
- phys2cvr.io.load_nifti_get_mask(fname, is_mask=False, dim=3)[source]¶
Load a nifti-like file and returns its data, its image, and a 3d mask.
Support all nibabel supported filetypes
- Parameters:
- Returns:
- data
np.ndarray Data from nifti file.
- mask
np.ndarray If is_mask is False, np.ndarray of one dimension less than data, in which any element that has at least a value different from zero in the last dimension of data is True. If is_mask is True, mask is a boolean representation of data.
- img
nib.img Image object from nibabel.
- data