from_gifti¶
Import in python using from mcutils.scripts.to_dataframe import from_gifti
-
mcutils.scripts.to_dataframe.
from_gifti
(img: Union[str, nibabel.gifti.gifti.GiftiImage], mask: Union[None, str, nibabel.nifti1.Nifti1Image, numpy.ndarray] = None, hemisphere: Optional[str] = None, basename='')[source]¶ Converts a GIFTI image into a pandas dataframe
- Parameters
img – input GIFTI image
mask – input mask (default: include all vertices)
hemisphere – hemisphere of the data
basename – basename of the columns
- Returns
pandas dataframe with unmasked vertices