nipy / nibabel

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

Cannot Open CIFTI File with wb_view #805

Open tjhendrickson opened 5 years ago

tjhendrickson commented 5 years ago

Hello,

I used nibabel to load a CIFTI file. I then used that data and performed some statistics and calculations on it. I then attempted to save modified data as a cifti file, but I get an error message from wb_view: image

Here are the relevant code snippets: cifti_img_corrected_pvalues_np_postpre_sub9203_seedThalamusLeftThalamusRight =nib.Cifti2Image(dataobj=corrected_pvalues_np_postpre_sub9203_seedThalamusLeftThalamusRight[1],header=cifti_img_sub9203_post_Yeo.header) nib.save(cifti_img_corrected_pvalues_np_postpre_sub9203_seedThalamusLeftThalamusRight,'post-pre_sub9203_seedThalamusLeft-ThalamusRight_FWER_correctedPvalues.dtseries.nii').

Thanks!

effigies commented 5 years ago

Hi @tjhendrickson, could you provide more details of the input data, and code used to modify the image? It sounds like the header no longer matches the shape of the result data, but I can't really say any more than that at this point.