Inline replies. Tim
On Fri, May 13, 2016 at 1:20 PM, Aaron C <[email protected]> wrote: > Dear HCP experts, > > I have some questions about the usage of CIFTI files. > > 1. I checked the number of grayordinates of the following files using the > command “wb_command -file-information”, and I noticed some of them have > different number of grayordinates: > > “Parcels_LR.dlabel.nii” from Gordon et al.’s parcellation: 64984 > grayordinates (32492 left cortex vertices and 32492 right cortex vertices). > “100206.aparc.a2009s.32k_fs_LR.dlabel.nii”: 59412 grayordinates (29696 > left cortex vertices and 29716 right cortex vertices) > “100206.MyelinMap.32k_fs_LR.dscalar.nii”: 59412 grayordinates (29696 left > cortex vertices and 29716 right cortex vertices) > “HCP_S900_820_rfMRI_MSMAll_groupPCA_d4500ROW_zcorr.dconn.nii”: 91282 > grayordinates (29696 left cortex vertices, 29716 right cortex vertices and > 31870 subcortical voxels) > Probably the easiest way to fix this is to use -cifti-create-dense-from-template to make cifti files that do have matching indices. Modifying a dconn is a bit trickier, and will also need to involve -cifti-transpose and -cifti-copy-mapping, and may use a lot of memory, so you may simply want to use the 91282 space as the template. > If two CIFTI files are with different number of grayordinates (e.g., > “Parcels_LR.dlabel.nii” and “100206.MyelinMap.32k_fs_LR.dscalar.nii”), when > both loaded into the MATLAB using "ciftiopen", then the first file will be > just a 64984x1 array, and the second file will be just a 59412x1 array, but > there is no other information about the correspondence of the same > grayordinate between these two files. My question is how could I locate the > same brain grayordinate from them? > You can also use -cifti-export-dense-mapping to get the mapping from matrix index to vertex/voxel + structure, but this is likely to be more involved. However, since you are interested in spatial neighbor information, you'll need this to figure that out. > 2. I have the time series of only a subset of cortical surface vertices in > a MATLAB matrix (e.g., a 59412x1200 matrix). How could I save the time > series of the subset of cortical surface vertices in a CIFTI *.dtseries.nii > file? The header of existing CIFTI *.dtseries.nii file cannot be used > directly since I didn’t find such *.dtseries.nii file with a dimensionality > of 59412x1200. > Use the ciftisavereset function from https://wiki.humanconnectome.org/display/PublicData/HCP+Users+FAQ#HCPUsersFAQ-2.HowdoyougetCIFTIfilesintoMATLAB ? > Similarly, I also have the pairwise correlations between only a subset of > cortical surface vertices in a MATLAB matrix (e.g., just a 59412x59412 > matrix, not like a 91282x91282 matrix which also includes subcortical > voxels). How could I save it in a CIFTI *.dconn.nii file? The header of > existing CIFTI *.dconn.nii file cannot be used directly since I didn’t find > such *.dconn.nii file with a dimensionality of 59412x59412. > dconn saving from matlab is not particularly well supported at the moment, unfortunately. What you could do is to save it with ciftisavereset to a .dtseries.nii name, and then use -cifti-copy-mapping to change the series mapping to the same dense mapping. The fieldtrip-derived cifti functions have some support for symmetric dconns, but have only recently started trying to preserve the excluded vertices information in the saved file (and not by default). > 3. How could I obtain surface vertex adjacencies of the fs_LR 32k surface > using wb_command? I am looking for some commands in Connectome Workbench > equivalent to the command “caret_command -surface-topology-neighbors” in > the Caret software. > We don't currently have a command for that in wb_command. You can load the gifti surface in matlab, and use the triangles array to make the information directly (all vertices in a single triangle are neighbors). Most spatial things workbench does use geodesic distances, rather than immediate neighbors. Immediate neighbors are not the same distance in different parts of the surface, or even for a single vertex. There is a command to produce geodesic distances from one vertex to all vertices (with an optional distance limit), though we haven't made an all vertices to all vertices command like caret5 has (we stopped using matlab to do spatial computations, as it was too slow for our purposes). What kind of spatial things are you wanting to do? We have commands for some of the more common spatial operations. > Thank you very much! > > > _______________________________________________ > 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
