To Whom it may concern,

I have created a .dlabel.nii file that is a parcellation covering both cortical 
and subcortical areas. Then, I have extracted mean values for each of the 
parcels from a contrast map using wb_command -cifti-parcellate.
After loading the resulting ptseries.nii files in matlab (using ft_readcifti), 
I would like to perform some operations on the values stored in the ptseries 
field, create a new .ptseries.nii file with the new values and visualize it in 
workbench.
Unfortunately, I can’t succeed in saving a CIFTI file that is read by workbench 
correctly.
Given that “cif” is my matlab structure, the output from ft_readcifti, with the 
values in cif.ptseries changed with the results of my calculations, I have 
attempted to use ft_write_cifti in several ways:

ft_write_cifti('test', cif, 'parameter', 'ptseries', 'brainstructure', 
'brainordinate.brainstructure', 'parcellation', 'brainordinate.parcellation')

Returns no errors, but then if I try:

ft_read_cifti('test.ptseries.nii')
Undefined function or variable 'pos'.
Error in ft_read_cifti (line 601)
brainordinate.brainstructure      = zeros(size(pos,1),1);

If instead I try:

ft_write_cifti('test', cif, 'parameter', 'ptseries')

I get a long list of regions:

parcel            L_Amygdala contains   315 vertices in CIFTI_STRUCTURE_INVALID
parcel            R_Amygdala contains   332 vertices in CIFTI_STRUCTURE_INVALID
parcel         L_Hippocampus contains   764 vertices in CIFTI_STRUCTURE_INVALID
parcel         R_Hippocampus contains   795 vertices in CIFTI_STRUCTURE_INVALID
parcel           L_Accumbens contains   135 vertices in CIFTI_STRUCTURE_INVALID
parcel           R_Accumbens contains   140 vertices in CIFTI_STRUCTURE_INVALID
parcel             L_Caudate contains   728 vertices in CIFTI_STRUCTURE_INVALID
parcel             R_Caudate contains   755 vertices in CIFTI_STRUCTURE_INVALID
parcel            L_Pallidum contains   297 vertices in CIFTI_STRUCTURE_INVALID
parcel            R_Pallidum contains   260 vertices in CIFTI_STRUCTURE_INVALID
parcel             L_Putamen contains  1060 vertices in CIFTI_STRUCTURE_INVALID
parcel             R_Putamen contains  1010 vertices in CIFTI_STRUCTURE_INVALID
parcel            L_Thalamus contains  1288 vertices in CIFTI_STRUCTURE_INVALID
parcel            R_Thalamus contains  1248 vertices in CIFTI_STRUCTURE_INVALID
parcel             BrainStem contains  3472 vertices in CIFTI_STRUCTURE_INVALID
parcel L_VentralDiencephalon contains   706 vertices in CIFTI_STRUCTURE_INVALID
parcel R_VentralDiencephalon contains   712 vertices in CIFTI_STRUCTURE_INVALID
parcel          L_Cerebellum contains  8709 vertices in CIFTI_STRUCTURE_INVALID
parcel          R_Cerebellum contains  9144 vertices in CIFTI_STRUCTURE_INVALID
parcel              R_V1_ROI contains   787 vertices in 
CIFTI_STRUCTURE_CORTEX_RIGHT
parcel             R_MST_ROI contains    76 vertices in 
CIFTI_STRUCTURE_CORTEX_RIGHT
(…)

The file gets written, but if I try to open it I get:

ft_read_cifti('test.ptseries.nii')
Dot indexing is not supported for variables of this type.

Error in ft_read_cifti (line 439)
          sel = strcmp({Surface(:).BrainStructure}, 
Parcel(j).BrainStructure{k});

Workbench also will not open the files generated this way, with two kinds of 
errors: for the first file: “xml and nifti header disagree on matrix 
dimensions” and for the second one: “Cifti XML error: you must set surfaces 
before adding parcels that use them”.
I suspect I am either missing something basic in the syntax of ft_write_cifti 
or my original .ptseries.nii files have something strange about them.
Thank you very much.
Yours faithfully,




Leonardo Tozzi, MD, PhD
Williams PanLab | Postdoctoral Fellow
Stanford University | 401 Quarry Rd
[email protected]<mailto:[email protected]> | (650) 5615738


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

Reply via email to