FCP-INDI / fcp-indi.github.io

Github Pages Repo for FCP-INDI
https://fcp-indi.github.io
2 stars 8 forks source link

📚 Document how to use a CIFTI atlas in C-PAC #231

Closed shnizzedy closed 3 years ago

shnizzedy commented 4 years ago

Related problem

This atlas that a user wants to use is currently only available in CIFTI format.

Proposed feature

Document how to use a CIFTI atlas in C-PAC.

Alternatives

Document how to convert a CIFTI atlas to a supported format (e.g., CIFTI → NIFTI).

sgiavasis commented 4 years ago

CIFTI atlases are stored in the *.dlabel.nii format. Unfortunately, despite the .nii extension, they do not work right out of the box with the tools we use for time series extraction or anything else that would employ an atlas.

The format of the data in a .dlabel is indeed far too different. From this guide:

A parcellation (*.dlabel.nii) CIFTI file contains some parcellation field myfield (Vx1) and myfieldlabel (1xQ), where Q is the number of parcels.

I took a look at some of these atlases with 3dinfo and they all indeed are 1D representations of the atlases. And just for fun, I tried using it with 3dROIstats but predictably got pushback:

*+ WARNING: Dataset /media/ebs/runs/v170_preproc/output/pipeline_cpac_preproc_freq-filter_nuisance/2014113_1/functional_to_standard/_scan_rest_acq-2_run-1/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/bandpassed_demeaned_filtered_antswarp.nii.gz has 271633 voxels/nodes while the mask has 1 - skipping

(And this was with using the -mask_f2short flag that is required for 1D atlas data).

So, for the alternative, it looks possible but maybe not easy or straightforward: https://neurostars.org/t/convert-from-cifti2-hcp-to-3d-array/3054

Though that neuropythy suggestion might hold promise.

Some more info: http://mvpa.blogspot.com/2014/03/nifti-cifti-gifti-in-hcp-and-workbench.html

For the C-PAC user docs, I would say for now we can simply point users to these resources and guides and just make it known that use of CIFTI files aren't supported. But of course as always, if anyone wants to share any tips or hacks with us, we are an open-source platform after all 😸