gastropy.neuro.fmri.to_nifti#
- gastropy.neuro.fmri.to_nifti(data_3d, affine)[source]#
Convert a 3D numpy array to a nibabel NIfTI image.
- Parameters:
data_3d (np.ndarray) – 3D volume data.
affine (np.ndarray) – 4x4 affine transformation matrix.
- Returns:
img – NIfTI image object (can be saved or passed to nilearn).
- Return type:
nibabel.Nifti1Image