Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
nilearn.surface.PolyData¶
- class nilearn.surface.PolyData(left=None, right=None)[source]¶
A collection of data arrays.
It is a shallow wrapper around the
parts
dictionary, which cannot be empty and whose keys must be a subset of {“left”, “right”}.- Parameters:
- left
numpy.ndarray
orstr
orpathlib.Path
or None, default = None - right
numpy.ndarray
orstr
orpathlib.Path
or None, default = None
- left
- Attributes:
- parts
dict
ofnumpy.ndarray
- shape
tuple
ofint
- parts
- to_filename(filename)[source]¶
Save data to gifti.
- Parameters:
- filename
str
orpathlib.Path
If the filename contains hemi-L then only the left part of the mesh will be saved. If the filename contains hemi-R then only the right part of the mesh will be saved. If the filename contains neither of those, then _hemi-L and _hemi-R will be appended to the filename and both will be saved.
- filename