@pimms.value<EOL><INDENT>def vertex_to_voxel_nearest_interpolation(lh_vertex_to_voxel_nearest_interpolation,<EOL>rh_vertex_to_voxel_nearest_interpolation):<DEDENT>
(lm, rm) = (lh_vertex_to_voxel_nearest_interpolation,<EOL>rh_vertex_to_voxel_nearest_interpolation)<EOL>(ls, rs) = (lm.shape, rm.shape)<EOL>(lels, rels) = (sps.find(lm), sps.find(rm))<EOL>rels = (rels[<NUM_LIT:0>] + ls[<NUM_LIT:0>], rels[<NUM_LIT:1>] + ls[<NUM_LIT:1>], rels[<NUM_LIT:2>])<EOL>(rows,cols,vals) = [np.concatenate(pair) for pair in zip(lels, rels)]<EOL>return sps.csr_matrix((vals, (rows,cols)), shape=np.add(ls, rs))<EOL>
sub.rh_gray_vertex_to_voxel_nearest_interpolation is a scipy sparse matrix representing the
  interpolation from the vertices into the voxels; the ordering of the voxels that is
  produced by the dot-product of this matrix with the vector of vertex-values is the same
  as the ordering used in sub.lh_gray_indices.
The method used is nearest-neighbors to either the closest pial or white surface vertex.