mvpa2.misc.surfing.surf_voxel_selection.voxel_selection¶
-
mvpa2.misc.surfing.surf_voxel_selection.
voxel_selection
(vol_surf_mapping, radius, source_surf=None, source_surf_nodes=None, distance_metric='dijkstra', eta_step=10, nproc=None, outside_node_margin=None, results_backend=None, tmp_prefix='tmpvoxsel')¶ Voxel selection for multiple center nodes on the surface
Parameters: vol_surf_mapping: volsurf.VolSurfMapping :
Contains gray and white matter surface, and volume geometry
radius: int or float :
Size of searchlight. If an integer, then it indicates the number of voxels. If a float, then it indicates the radius of the disc
source_surf: surf.Surface or None :
Surface used to compute distance between nodes. If omitted, it is the average of the gray and white surfaces.
source_surf_nodes: list of int or numpy array or None :
Indices of nodes in source_surf that serve as searchlight center. By default every node serves as a searchlight center.
distance_metric: str :
Distance metric between nodes. ‘euclidean’ or ‘dijksta’ (default)
eta_step: int :
Report progress every eta_step (default: 10).
nproc: int or None :
Number of parallel threads. None means as many threads as the system supports. The pprocess is required for parallel threads; if it cannot be used, then a single thread is used.
outside_node_margin: float or True or None (default) :
By default nodes outside the volume are skipped; using this parameter allows for a marign. If this value is a float (possibly np.inf), then all nodes within outside_node_margin Dijkstra distance from any node within the volume are still assigned associated voxels. If outside_node_margin is True, then a node is always assigned voxels regardless of its position in the volume.
results_backend : ‘native’ or ‘hdf5’ or None (default).
Specifies the way results are provided back from a processing block in case of nproc > 1. ‘native’ is pickling/unpickling of results by pprocess, while ‘hdf5’ would use h5save/h5load functionality. ‘hdf5’ might be more time and memory efficient in some cases. If None, then ‘hdf5’ if used if available, else ‘native’.
tmp_prefix : str, optional
If specified – serves as a prefix for temporary files storage if results_backend == ‘hdf5’. Thus can specify the directory to use (trailing file path separator is not added automagically).
Returns: sel: volume_mask_dict.VolumeMaskDictionary :
Voxel selection results, that associates, which each node, the indices of the surrounding voxels.