Let’s hear a confirmation from Tim Coalson that a dconn header would actually be properly reset, I’m not sure that is true.

Matt.

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


Hi,
I haven't used the 'ciftisavereset' function, but a dscalar.nii should have grayordinates as the first dimension, so try saving the transpose of your data (i.e., an [nGrayOrdinates x 1] vector).

cheers,
-MH

-- 
Michael Harms, Ph.D.
-----------------------------------------------------------
Conte Center for the Neuroscience of Mental Disorders
Washington University School of Medicine
Department of Psychiatry, Box 8134
660 South Euclid Ave. Tel: 314-747-6173
St. Louis, MO  63110 Email: [email protected]

From: Julien Dubois <[email protected]>
Date: Wednesday, December 10, 2014 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

 


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