mvpa2.support.nibabel.afni_niml_roi.niml_roi2roi_mapping

mvpa2.support.nibabel.afni_niml_roi.niml_roi2roi_mapping(rois)

Converts NIML ROI representation in mapping from ROI labels to node indices

Parameters:

roi: list of dictionaries

NIML ROIs representation, e.g. from read()

Returns:

roi_mapping: dict

A mapping from ROI labels to numpy arrays with node indices

Notes

It is assumed that all labels in the rois are unique, otherwise an exception is raised