Description
Hello! I think this may be a bit of a reach but I am having an issue with the {subject}.aparc.32k_fs_LR.dlabel.nii files from HCP, I've looked all over the internet and found nothing. To extract the ROI mapping, this is essentially what I've done:
def load_atlas_aux(path2atlas):
try:
cifti_file = nib.load(path2atlas)
except Exception as e:
print("Error loading CIFTI file:", e)
return None
data = cifti_file.get_fdata()
segmentation_atlas = data.ravel()
return segmentation_atlas
It works well, but it does not provide the same resaults I obtained from my matlab base file, which does something different by accessing a particular mapping like this:
subjlab = ft_read_cifti(path2atlas);
load_atlas_cmd = strcat('subjlab.x',subject,'_aparc');
segmentation_atlas = eval(load_atlas_cmd);
The problem is that cifti in matlab obviously doesn't have the same implementation as nibabel library so I don't know how to access that specific "attribute" of the atlas with this library. Maybe someone has faced something similar before or has any guidance for me, thank you!!