Wow, thank you all for the extremely quick support! much appreciated.

The solution to load a .dtseries.nii and replace the data with a (all
grayordinates) x 1 vector worked well.

Tim, thank you for the suggestion to use cifti-average-roi-correlation, Ill
look into it.

- Julien




On Wed, Dec 10, 2014 at 1:47 PM, Timothy Coalson <[email protected]> wrote:

> -cifti-convert will happily reset a dconn file to scalars along row (ie,
> make a dscalar file), that is not the issue.
>
> It sounds like you are trying to go from an input of (some voxels) x (all
> grayordinates) to an output of (all brainordinates) x (subjects).  The
> ciftisavereset function doesn't read the cifti XML, and thus can't
> transpose the mappings on it, and it always resets the mapping along the
> row.
>
> If this is the case, you could transpose the dconn you are reading in and
> replacing the data of, making it (all grayordinates) x (some voxels), or as
> Matt suggests, using a dtseries or dscalar for that template file instead.
>
> Also, while -cifti-average-roi-correlation may not do exactly what you
> did, it does something similar, and may be worth a look:
>
>
> http://www.humanconnectome.org/software/workbench-command.php?function=-cifti-average-roi-correlation
>
> You can also use -cifti-merge to horizontally concatenate cifti files.
>
> Tim
>
>
> On Wed, Dec 10, 2014 at 3:40 PM, Glasser, Matthew <[email protected]
> > wrote:
>
>>  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 = 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
>>
>>
>>  ------------------------------
>>
>> 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
>>
>
>

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

Reply via email to