Converting nifti(*.nii.gz) to cifti(*.dscalar.nii)

924 views
Skip to first unread message

LEE

unread,
Dec 6, 2021, 5:05:22 AM12/6/21
to HCP-Users
Dear HCP users

I have a question about converting atlas nifti file to cifti *.dscalar.nii file.

Eventually, I need cifti *.dlabel.nii file to use with wb_command -cifti-parcellate and
I heard how to change *.dscalar.nii file to *.dlabel.nii. (using -cifti-label-import)

Is there anyone how to change it from atlas nifti file to cifti *.dscalar file, please let me know.

Many thanks,


LEE


Glasser, Matt

unread,
Dec 6, 2021, 6:34:42 AM12/6/21
to hcp-...@humanconnectome.org

Is this from an individual subject?  We don’t recommend trying this sort of thing with group average NIFTI volume data for the cerebral cortex.  Any group averaging should occur on the cortical surface.

 

Matt..

--
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/eef5f4cc-8d19-46a1-bb3f-92137497207dn%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.

이지원

unread,
Dec 6, 2021, 7:02:56 AM12/6/21
to hcp-...@humanconnectome.org
The goal is atlas nifti file to apply all subject's cifti *.dtseries.nii file. 
Then  I want the output dimension would be timeseries x the number of ROIs. (e.g., 1200 x 116)

For doing this I need cifti *.dlabel.nii file to use wb_command -cifti-parcellate.

LEE.



2021년 12월 6일 (월) 오후 8:34, Glasser, Matt <glas...@wustl.edu>님이 작성:

Coalson, Timothy Scott (S&T-Student)

unread,
Dec 6, 2021, 8:49:34 PM12/6/21
to hcp-...@humanconnectome.org
The parcellations we recommend often already have a .dlabel.nii format available.  Even parcellations that are carefully generated using surfaces are damaged if they are converted to volume format, which we show with our HCP MMP parcellation:


Are you trying to compare volume-based parcellations to surface-based ones?

Tim


From: 이지원 <scjj...@gmail.com>
Sent: Monday, December 6, 2021 6:02 AM
To: hcp-...@humanconnectome.org <hcp-...@humanconnectome.org>
Subject: Re: [hcp-users] Converting nifti(*.nii.gz) to cifti(*.dscalar.nii)
 
WARNING: This message has originated from an External Source. This may be a phishing expedition that can result in unauthorized access to our IT System. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Coalson, Timothy Scott (S&T-Student)

unread,
Dec 6, 2021, 8:52:26 PM12/6/21
to hcp-...@humanconnectome.org
Sorry, correction: damaged if they are converted to a "group average" volume format.  This problem is also fairly specific to cortical parcellations, because it is caused by variability in (particularly human) cortical folding and function location.

Tim


From: Coalson, Timothy Scott (S&T-Student) <tsc...@mst.edu>
Sent: Monday, December 6, 2021 7:49 PM

이지원

unread,
Dec 6, 2021, 10:27:42 PM12/6/21
to hcp-...@humanconnectome.org
I tried to compare volume-based parcellations to surface-based ones but output dimension was different so that is what I was asking.

thanks,

LEE 

2021년 12월 7일 (화) 오전 10:52, Coalson, Timothy Scott (S&T-Student) <tsc...@mst.edu>님이 작성:

Tamás Andrei Földes

unread,
Sep 15, 2023, 7:18:49 AM9/15/23
to HCP-Users, LEE
I would like to do the same with the recently published Extended HCP atlas: https://github.com/wayalan/HCPex

Given that its in NIFTI and `HCPex.nii.gz` is defined in the MNI ICBM152 2009c asymmetric T1 template, am I right to think that this first needs to be registered to some CIFTI template via e.g.: ANTs like 91k_fsLR? And next use -cifti-create-dense-from-template to create a .dlabel.nii file?

My main goal would be to be able to use -cifti-parcellate and -cifti-correlation with this atlas.

Tim Coalson

unread,
Sep 15, 2023, 5:23:58 PM9/15/23
to hcp-...@humanconnectome.org, LEE
The "HCPex" atlas chose to avoid the HCP principles of analysis (even after we talked to them), and is not affiliated with the HCP or CCF.  As I understand it, their cortical parcellation is just a volume approximation of the HCP MMP 1.0, which we defined on the surface in the first place (and is substantially less accurate in the volume, for reasons described in https://www.pnas.org/doi/10.1073/pnas.1801582115 ).

There might be some value in extracting the subcortical parcellation that was used in HCPex and combining it with the original HCP MMP 1.0 (I don't recall the details of their subcortical parcellation, but you can use https://balsa.wustl.edu/file/87B9N , and -cifti-replace-structure with -volume-all, though you might need to resample their volume first - we use MNI nonlinear space for our standard cifti subcortical space, so you probably don't need to do a registration), but doing an extra surface mapping step to doubly-approximate the MMP 1.0 parcels from this volumetric approximation is counterproductive.

Tim


Tamás Andrei Földes

unread,
Sep 17, 2023, 10:31:28 AM9/17/23
to HCP-Users, tim.c...@gmail.com, LEE
Hi Tim,

Thanks. Yes I can definitely see the value in sticking with the original  HCP MMP 1.0 for the cortical part of the parcellation...
It is indeed the subcortical parcellation that I would like transform into CIFTI as it has some regions I haven't seen in other parcellations. So you suggestion is to take HCP standard parcellation and just "swap" out its volumetric subcortical part with HCPex's subcortical part? Should I just run the following then?
  • wb_command -cifti-replace-structure Q1-Q6_RelatedValidation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors_with_Atlas_ROIs2.32k_fs_LR.dlabel.nii COLUMN -volume-all HCPex.nii.gz
You mention "MNI nonlinear space for our standard cifti subcortical space," is that ICBM 2009c Nonlinear Asymmetric?
Thanks in advance,
Tamas

Tim Coalson

unread,
Sep 18, 2023, 7:43:45 PM9/18/23
to Tamás Andrei Földes, HCP-Users, LEE
The nonlinear MNI registration we run in the HCP pipelines is to the 0.7mm (YA, used for the MMP 1.0) or 0.8mm (Lifespan) version of the T1w file here:


We may have modified the volume space on some of these so that fsl's scale space works out to have the same alignment as mm space.  I don't know the exact version we started with, we may have taken it from FSL's templates.

The subcortical structure definitions may have come from Conte69, rather than the HCP data.  I am unclear on the processing that led to them.

Tim

Glasser, Matt

unread,
Sep 18, 2023, 9:18:57 PM9/18/23
to hcp-...@humanconnectome.org, Tamás Andrei Földes, LEE

Our volume standard spaces are based on FSL’s nonlinear MNI templates. 


Matt.

Message has been deleted

Tamás Andrei Földes

unread,
Sep 19, 2023, 5:19:23 AM9/19/23
to HCP-Users, HCP-Users, HCP-Users, HCP-Users
Thanks Matt and Tim,
  1. Right, so MNI152NLin6 I assume. Can I ask a follow-up question about whether the used FSL template was symmetric or asymmetric? I think their original template is symmetric.
  2. When running wb_command -cifti-replace-structure, do I need to (or can I) replace the labels belonging to the volumetric parcels? Or can I ensure that they don't collide with the cortical labels? I'm sure this is a CIFTI newbie question :)  

Glasser, Matt

unread,
Sep 19, 2023, 7:26:39 AM9/19/23
to Tamás Andrei Földes, HCP-Users, HCP-Users

It was an asymmetric template.  It wasn’t called that—this is from years ago.

 

Matt.

Reply all
Reply to author
Forward
0 new messages