I’m not sure the wb_command -cifti-convert -reset options work with a dconn as the input header file.  Do you have some other dscalar or dtseries file you can load into matlab and use as the header?  

Then it should work fine.  Also I have a new version of ciftisavereset that I could distribute which will reset pscalar and ptseries files for when one is working with parcellated data.

Peace,

Matt.

From: Julien Dubois <[email protected]>
Date: Wednesday, December 10, 2014 at 3:30 PM
To: "[email protected]" <[email protected]>
Subject: [HCP-Users] error while writing cifti with Matlab

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 = "">
>> 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

 


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.

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

Reply via email to