mvpa2.misc.surfing.volsurf.VolSurfMinimalLowresMapping

Inheritance diagram of VolSurfMinimalLowresMapping
class mvpa2.misc.surfing.volsurf.VolSurfMinimalLowresMapping(vg, white, pial, intermediate=None, nsteps=10, start_fr=0.0, stop_fr=1.0, start_mm=0, stop_mm=0)

Represents the minimal mapping from nodes to voxels, incorporating the intermediate surface that can be of lower-res. ‘minimal’, in this context, means that the mapping from voxels to nodes is many-to-one (i.e. each voxel is associated with at most one node). Each node mapped must be present in the intermediate surface

Each voxel can be associated with just a single node.

Parameters:

volgeom: volgeom.VolGeom

Volume geometry

white: surf.Surface

Surface representing white-grey matter boundary

pial: surf.Surface

Surface representing pial-grey matter boundary

intermediate: surf.Surface (default: None).

Surface representing intermediate surface. Unlike in its superclass this argument cannot be ommited here.

nsteps: int (default: 10)

Number of steps from white to pial surface

start_fr: float (default: 0)

Relative start position of line in gray matter, 0.=white surface, 1.=pial surface.

stop_fr: float (default: 1)

Relative stop position of line (as in see start).

start_mm: float (default: 0)

Absolute start position offset (as in start_fr).

stop_mm: float (default: 0)

Absolute start position offset (as in start_fr).

Notes

‘pial’ and ‘white’ should have the same topology.

Attributes

intermediate_surface Returns the node-wise average of the pial and white surface
pial_surface Returns the pial surface
volgeom Returns the volume geometry
white_surface Returns the white surface

Methods

coordinates_to_grey_distance_mm(nodes, xyz) Computes the grey position of coordinates in metric units
get_node2voxels_mapping()
Returns:
get_parameter_dict() Returns a dictionary with the most important parameters of this instance
surf_project_nodewise(xyz) Projects coordinates on lines connecting pial and white matter.
surf_project_weights(nodes, xyz) Computes relative position of xyz on lines from pial to white matter.
surf_project_weights_nodewise(xyz) Computes relative position of xyz on lines from pial to white matter.
surf_unproject_weights_nodewise(weights) Maps relative positions in grey matter to coordinates
voxel_count_nifti_image() Returns a NIFTI image indicating how often each voxel is selected.
get_node2voxels_mapping()
Returns:

n2v: dict

A mapping from node indices to voxels. In this mapping, the

‘i’-th node is associated with ‘n2v[i]=v2p’ which contains the

mapping from linear voxel indices to grey matter positions. In

other words, ‘n2v[i][idx]=v2p[idx]=pos’ means that the voxel with

linear index ‘idx’ is associated with node ‘i’ and has has

relative position ‘pos’ in the gray matter.

If node ‘i’ is outside the volume, then ‘n2v[i]=None’.

Notes

The typical use case is selecting voxels in the grey matter. The rationale of this method is that (assuming a sufficient dense cortical surface mesh, combined with a sufficient number of nsteps, the grey matter is sampled dense enough so that ‘no voxels are left out’.