nipy / nibabel

Python package to access a cacophony of neuro-imaging file formats
http://nipy.org/nibabel/
Other
646 stars 257 forks source link

Trouble With CIFTI Files #767

Open tjhendrickson opened 5 years ago

tjhendrickson commented 5 years ago

Hello I am exploring how to use nibabel to manipulate CIFTI files. I currently have a parcellated time series (ptseries) in which I am attempting to extract the surface (left and right hemisphere) and volume elements (subcortical structures) but I cannot seem to figure out what combination of commands to use.

Here is what I have so far: cifti_img = nib.load(*.ptseries.nii)

Best,

-Tim

effigies commented 5 years ago

Sorry, I'm not really clear on what exactly you've tried. Documentation for CIFTI is definitely lacking. One thing you might try exploring is the cifti2.Axis API:

import nibabel as nib
img = nib.load(fname)
axis_header = img.get_axis()

These docs may help you explore your image more: https://nipy.org/nibabel/reference/nibabel.cifti2.html#module-nibabel.cifti2.cifti2_axes