I want to “label” each voxel to a specific parcel based on an atlas.
My question is, is there an exposed API that returns the parcel label of each voxel? In other words, which parcel a voxel belong to. I assume this is already implemented using fit_transform and plot_roi methods. The fit_transform method averages the time-series of the voxels that belong to the same parcel. I am trying to track down plot_roi to see how you map the voxels to parcels based on the center of mass coordinates but before going further I just want to make sure that there is an API exposed to do this?
If it matters, I use Yeo17thick atlas.
Code Example:
Assume I have a time-series matrix A_{t x v}, where t is the time and v is the number of voxels:
I = get_parcels_labels(A, yeo['thick17']) #yeo['thick17'] is the file path of nifti of yeo
The output, I , will be a vector of size v , where each element could have a value {0,1,2,…,16}. Which represents the parcels’ labels.