Merging subcortical and cortical dlabel.nii

125 views
Skip to first unread message

amirhussein.a

unread,
Jul 4, 2024, 6:51:39 AM7/4/24
to HCP-Users
Hi all,

I want to combine two .dlabel.nii files, one for cortical and the other for the subcorticals. I'm interested in using the resulting single dlabel file to convert the HCP's dense time-series into a parcel time-series using -cifti-parcellate. I couldn't find any straight-forward answer in the mailing list, thus posting this question. 

Best,
Amir

Dierker, Donna

unread,
Jul 4, 2024, 8:59:08 AM7/4/24
to hcp-...@humanconnectome.org

Maybe cifti-separate to split the existing dlabel.nii into their components, then cifti-create to reassemble?

 

 

From: amirhussein.a <amirhu...@gmail.com>
Sent: Thursday, July 4, 2024 5:52 AM
To: HCP-Users <hcp-...@humanconnectome.org>
Subject: [hcp-users] Merging subcortical and cortical dlabel.nii

 

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/5bee999c-6e8b-49b4-8749-2b13f89d9e9fn%40humanconnectome.org.

 


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.

J. A. Quent

unread,
Jul 8, 2024, 1:25:12 PM7/8/24
to hcp-...@humanconnectome.org

Hello Amir,

This sort of thing is very easy to do using the R package ciftiTools: https://github.com/mandymejia/ciftiTools

Here (https://github.com/mandymejia/ciftiTools/issues/61) is a similar use case where I used ciftiTools to create an ROI mask based on a differrent MNI .nii I had. You can do something very similar adding cortical and subcortical data into file.

You can find their paper here: https://www.sciencedirect.com/science/article/pii/S1053811922000076

Let me know if I can help.

Best,

Alex


-----Original Messages-----
From: "'Dierker, Donna' via HCP-Users" <hcp-...@humanconnectome.org>
Send time: Thursday, 07/04/2024 20:58:58
To: "hcp-...@humanconnectome.org" <hcp-...@humanconnectome.org>
Subject: RE: [hcp-users] Merging subcortical and cortical dlabel.nii
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/DS0PR02MB9323B3114DD5431A67E7CC9AA3DE2%40DS0PR02MB9323.namprd02.prod.outlook.com.




____________________________________
Jörn Alexander Quent, PhD
Post doctoral researcher
Fudan University, Shanghai China
Institute of Science and Technology for Brain-inspired Intelligence (ISTBI)
https://jaquent.me
https://twitter.com/J_A_Quent
https://istbi.fudan.edu.cn

Note: If I e-mail you during a time period that coincides with a period 
where you’re on leave or that is a holiday period in your region, please 
do not feel obliged to respond to me before you come back. In a global 
world people do not celebrate the same holidays.

Tim Coalson

unread,
Jul 8, 2024, 5:16:59 PM7/8/24
to hcp-...@humanconnectome.org
-cifti-create-dense-from-template is probably the best way to do this, to make sure the index order (and medial wall ROI, etc) matches another existing file.  You can specify the -cifti argument more than once, as long as there isn't more than one file containing a specific structure.  If your cortical parcellation is a 91282 grayordinates file (such that it represents subcortical indices, but sets them to the unlabeled key), then you first need to -cifti-separate the left and right hem data into .label.gii files, and then use those with the -metric repeatable option (instead of -cifti) in -cifti-create-dense-from-template.


Tim


--

amirhussein.a

unread,
Jul 10, 2024, 7:34:06 AM7/10/24
to HCP-Users, tim.c...@gmail.com
Thank you all for the kind suggestions. I think using -cifti-create-dense-from-template was the way to go in my case. My cortical dlabel file was the MMP1 cortical (including ~60K) and the subcorticals had ~30K. I also had to add -label-collision SURFACES_FIRST flag for conflicting key values across two labels. For the input template to the command, I used MMP1_subcorticals dlabel file from here: https://balsa.wustl.edu/file/87B9N

Best,
Amir

Reply all
Reply to author
Forward
0 new messages