mvpa2.misc.surfing.volgeom.from_any¶
-
mvpa2.misc.surfing.volgeom.
from_any
(s, mask_volume=None)¶ Constructs a VolGeom instance from any reasonable type of input.
Parameters: s : str or VolGeom or nibabel SpatialImage-like or
mvpa2.datasets.base.Dataset-like with nifti-image header.
Input to use to construct the VolGeom instance. If s is a string, then it is assumed to refer to the file name of a NIFTI image.
mask_volume: boolean or int or None (default: False) :
If an int is provided, then the mask-volume-th volume in s is used as a voxel mask. True is equivalent to 0. If None or False are provided, no mask is applied. Fmri-dataset-like objects are treated specifally: If s is such an object an mask_volume is None, it will automatically use s.fa[‘voxel_indices’] to define the mask (if that attribute is present). Alternatively, if mask_volume is a string, then the mask is defined based on the voxel indices that are assumed to be present s.fa[mask_volume].
Returns: vg: VolGeom :
Volume geometry associated with s.