to_nifti¶
Import in python using from mcutils.scripts.to_dataframe import to_nifti
-
mcutils.scripts.to_dataframe.
to_nifti
(dataframe, names, reference)[source]¶ Writes the data from a pandas dataframe to a NIFTI file on disc
- Parameters
filename – NIFTI output filename
dataframe – Pandas dataframe listing the voxels and resulting data
names – columns to export
reference – reference image to set size and affine
- Returns
Nibabel NIFTI image