Hello list

I am testing out the cifti format with Matlab, and am running into an error
that I dont seem to be able to figure out. Its likely quite simple, so here
it is.

I created a cifti file for the correlation between some voxels (defined by
a volume mask) and the rest of the brain, using wb_command
-cifti-correlation and the -roi-override option. I did this for a bunch of
subjects, and now want to look at the average across subjects. I am loading
the result for each subject with ciftiopen.m, which gives me a matrix
nVoxInRoi x nVoxInBrain. I then average along the rows, giving a row vector
with the average correlation of the voxels in the ROI to the rest of the
brain. I concatenate all the row vectors for all subjects, and end up with
a matrix nSub x nVoxInBrain (this is all done in Atlas space). I then
average this matrix across subjects, giving a row vector again, finalRes (1
x nVoxInBrain). I want to save this vector to a cifti file so I can display
it in connectome workbench. I use ciftisavereset, but get the following
error:
>> cii = ciftiopen('subject1testconn.dconn.nii','/usr/bin/wb_command');
>> newcii = cii
>> newcii.data = finalRes
>> ciftisavereset(newcii,'finalRes.dscalar.nii','/usr/bin/wb_command')

While running '/usr/bin/wb_command -cifti-convert -from-gifti-ext
finalRes.dscalar.nii.gii finalRes.dscalar.nii -reset-scalars':
ERROR: dimensions of input gifti array do not match dimensions in the
embedded Cifti XML
/usr/bin/wb_command -cifti-convert -from-gifti-ext finalRes.dscalar.nii.gii
finalRes.dscalar.nii  -reset-scalars: Signal 127

Im not sure how to get around this error. Im sure it stems from my poor
understanding of the cifti format (which I will try to improve on). Any
hints on how to circumvent this error?

Thanks!
- Julien

_______________________________________________
HCP-Users mailing list
[email protected]
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to