The aparc file is indeed a surface only file.  This is not a recommended 
cortical parcellation.  I recommend you use this one:



 on behalf of Timothy Coalson <<>>
Date: Wednesday, October 12, 2016 at 3:08 PM
To: Jean-Francois Cabana <<>>
Cc: "<>" 
Subject: Re: [HCP-Users] get ROIs average

That error actually means that the grayordinate space isn't the same - either 
there is no volume data in one of them, or medial wall masks weren't used, or 
the ROIs were different, or...

I'm not familiar with a dlabel form of the aparc file, but as the filename 
suggests that it is surface-based for cortex, you should be able to use 
-cifti-parcellate to do what you want, followed by -cifti-convert -to-text to 
get it as a text form.  The output of -cifti-parcellate is a parcellated cifti 
file, which also contains the metadata required to display the area averages as 
patches of color on the surfaces (and in volume if there are volume parcels).  
The -cifti-parcellate command is a bit more forgiving in that it should work as 
long as the surface resolution and volume space (if the dlabel has volume data) 
are matched up.

Note that if the dlabel file does not distinguish between left and right 
labels, then the parcellated output for areas will be averaged across both 


On Wed, Oct 12, 2016 at 7:19 AM, Jean-Francois Cabana 
<<>> wrote:
Dear HCP users,

I'm trying to find out how to compute ROIs average from a dscalar file. What I 
want to do is take all ROIs from the aparc.dlabel.nii file and compute the 
average from a dscalar.nii file in each label and print the values to a text 
file. What I did was first to convert the labels to ROIs with the 
-cifti-all-labels-to-rois command, and then use the resulting roi file in the 
-cifti-roi-average command. For example :

wb_command -cifti-all-labels-to-rois HN82.aparc.164k_fs_LR.dlabel.nii 1 

wb_command -cifti-roi-average HN82.DKI_mk.164k_fs_LR.dscalar.nii 
HN82.DKI_mk.txt -cifti-roi HN82.aparc.roi.164k_fs_LR.dscalar.nii

But then I get this error :

ERROR: dense mappings of input and roi cifti files don't match

I think the problem might be that the ROI file contains several maps, one for 
each ROI, while the dscalar has only one. Is there a way to do what I want to 
do without having for example to split the ROI in several files, one for each 

Thanks in advance,

HCP-Users mailing list<>

HCP-Users mailing list<>

The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

HCP-Users mailing list

Reply via email to