First, the size of 64984 shows that the cifti file in question did not have
the medial wall masked out internally, which is likely the starting point
for these problems.  I don't know how medialMask is defined, but if it
isn't 32492 elements long (in this case), then that will cause another
problem, as the break between left and right data will be in the wrong
place.

If you really didn't do any steps between defining labelsL and labelsR, and
anotherCii was made as a copy of that same cii variable, then I don't know
how it managed to mess things up, though, unless this cifti file also
managed to have right hemisphere before left hemisphere (the format
supports this, but we have tried to be consistent with the order - the lack
of a medial wall mask indicates this dlabel file was generated in an
unusual way, though).  You can use "wb_command -file-information
-no-map-info" to see the order of structures in the cifti file.

Tim


On Wed, Aug 3, 2016 at 11:22 AM, Salim Arslan <[email protected]>
wrote:

> Hello,
>
> I am trying to get Power parcellations out of
> RSN-networks.32k_fs_LR.dlabel.nii, that comes with the "Brain Analysis
> Library of Spatial maps and Atlases (BALSA) database study" (
> https://balsa.wustl.edu/study/show/WG33). It is also part of the tutorial
> dataset.
>
> I did what I have been always doing for extracting data from CIFTI files
> in Matlab. Using ciftiopen, I obtained the cii object, which in this case,
> contains the cdata matrix of size 64984x4. The 3rd column here corresponds
> to the holes-filled Power parcellations. To extract those for both
> hemispheres, I simply split up the 64984 vector and masked out the medial
> wall vertices and then saved the labels back to CIFTI.
>
> cii = ciftiopen('RSN-networks.32k_fs_LR.dlabel.nii', wb_command);
> cdata = cii.cdata;
> parcellation = cdata(:,3);
> labelsL = cifti(1:length(medialMask));
> labelsR = cifti(length(medialMask)+1:end);
> anotherCii.cdata = [labelsL;labelsR];
> ciftisave(anotherCii,'power.dlabel.nii',wb_command)
>
> However when I visualized the labels on workbench, I noticed some holes
> (with random labels) in many parcels. Please see the attached figure for
> clarification.
>
> I assume this is something to do with the medial masking, but cannot
> figure out what is wrong. Any help is appreciated.
>
> Thanks for your attention.
>
> Best regards,
> Salim
>
> --
>
> _______________________________________________
> 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