mvpa2.misc.surfing.queryengine.SurfaceVoxelsQueryEngine

Inheritance diagram of SurfaceVoxelsQueryEngine
class mvpa2.misc.surfing.queryengine.SurfaceVoxelsQueryEngine(voxsel, space='voxel_indices', add_fa=None, fallback_euclidean_distance=True)

Query-engine that maps center voxels (indexed by feature ids) to indices of features (voxels) that are near each center voxel.

In a typical use case such an instance is generated using the function ‘disc_surface_queryengine’ with the output_space=’voxels’ argument.

For a mapping from center nodes (on a surface) to voxels, consider SurfaceVerticesQueryEngine.

Attributes

add_fa
ids

Methods

__call__(\*\*kwargs)
feature_id2linear_voxel_ids(feature_id)
feature_id2nearest_vertex_id(feature_id[, ...]) Compute the index of the vertex nearest to a given voxel.
get_masked_nifti_image([center_ids]) Returns a nifti image indicating which voxels are included in one or more searchlights.
linear_voxel_id2feature_id(linear_voxel_id)
query(\*\*kwargs)
query_byid(feature_id) Query the engine using a feature id
train(ds) Train the query engine on a dataset
untrain()
vertex_id2nearest_feature_id(vertex_id) Compute the index of the voxel nearest to a given vertex.

Makes a new SurfaceVoxelsQueryEngine

Parameters:

voxsel: volume_mask_dict.VolumeMaskDictionary

mapping from center node indices to indices of voxels in a searchlight

space: str (default: ‘voxel_indices’)

defines by which space voxels are indexed.

add_fa: list of str

additional feature attributes that should be returned when this instance is called with a center node id.

fallback_euclidean_distance: bool (default: True)

If True then every feature id will have voxels associated with it. That means that the number of self.ids is then equal to the number of features as the input dataset. If False, only feature ids that are selected by at least one searchlight are used. The number of self.ids is then equal to the number of voxels that are selected by at least one searchlight.

Attributes

add_fa
ids

Methods

__call__(\*\*kwargs)
feature_id2linear_voxel_ids(feature_id)
feature_id2nearest_vertex_id(feature_id[, ...]) Compute the index of the vertex nearest to a given voxel.
get_masked_nifti_image([center_ids]) Returns a nifti image indicating which voxels are included in one or more searchlights.
linear_voxel_id2feature_id(linear_voxel_id)
query(\*\*kwargs)
query_byid(feature_id) Query the engine using a feature id
train(ds) Train the query engine on a dataset
untrain()
vertex_id2nearest_feature_id(vertex_id) Compute the index of the voxel nearest to a given vertex.
get_masked_nifti_image(center_ids=None)

Returns a nifti image indicating which voxels are included in one or more searchlights.

Parameters:

center_ids: list or None

Indices of center ids for which the associated masks must be used. If None, all center_ids are used.

Returns:

img: nibabel.Nifti1Image

Nifti image with value zero for voxels that we not selected, and non-zero values for selected voxels.

Notes

When using surface-based searchlights, a use case of this function is to get the voxels that were associated with the searchlights in a subset of all nodes on a cortical surface.

ids
query_byid(feature_id)

Query the engine using a feature id

train(ds)

Train the query engine on a dataset

untrain()