You don't need to create surface files. What you need is a cifti file. No, you don't need a surface file to use -cifti-create-dense-scalar.
If you don't want to compare your data to HCP data, then staying on your current mesh will work, but isn't really recommended. This is because fsaverage and its variants don't have vertex correspondence between right and left hemispheres (makes it harder to compare across hemispheres, contralateral identification in wb_view won't work properly), and a CIFTI file made from fsaverage6 isn't going to be easy to compare to anything else (the rest are using 32k_fs_LR). If this sounds like what you want to do, just use -cifti-create-dense-scalar with only the -left-metric and -right-metric options (no -volume, no -cerebellum-metric, no -roi-* options) - NOTE: this will result in the *left* cortex being first in the set of indices, so make sure your matrix is organized properly for it. You can use any fsaverage6-resolution gifti metric files (.func.gii or .shape.gii, for instance putting the sulc measure through mris_convert). Once you have that, you can use ciftiopen, then replace the data, then ciftisavereset, then -cifti-change-mapping to make the .dconn.nii file. Tim On Sun, Sep 11, 2016 at 10:24 PM, Braga, Rodrigo Martin < rbr...@fas.harvard.edu> wrote: > Hi Tim, > > > > I’m using the fsaverage6 template, so the “41k” version with 40962 > vertices in each hemisphere, hence the 81924x81924 (bilateral) connectivity > matrix. I’d like to stay in this resolution if possible. Could you offer > any guidance as to how I can create the gifti surface file? > > > > I played with wb_command –cifti-create-dense-scalar, but from what you’re > saying I presume the gifti surface file is a precursor to this command also. > > > > Rod > > > > > > > > *From: *Timothy Coalson <tsc...@mst.edu> > *Date: *Sunday, 11 September 2016 at 21:24 > *To: *Rodrigo <rbr...@fas.harvard.edu>, "hcp-users@humanconnectome.org" < > hcp-users@humanconnectome.org> > > *Subject: *Re: [HCP-Users] Converting an FC matrix into dconn.nii > > > > You need to open a *cifti* file, specifically using "ciftiopen". You > opened a gifti surface file. > > Also, since your matrix is apparently 81924 in size, this won't match our > 91282 grayordinate space, so in fact you will first need to create the > proper cifti template file using the various ROIs that led you to this > matrix size. Alternatively, you could resample your data to our 32k_fs_LR > space in order to match our 91282 grayordinate space to easily enable > comparisons to the HCP data. What surfaces are you currently using? > > Tim > > > > On Sun, Sep 11, 2016 at 5:55 PM, Braga, Rodrigo Martin < > rbr...@fas.harvard.edu> wrote: > > Hi Tim, > > > > Thanks for the speedy response. > > > > I’ve managed to load a freesurfer fsaverage6 standard mesh template (which > I got from here: http://brainvis.wustl.edu/workbench/standard_mesh_ > atlases.zip > <https://urldefense.proofpoint.com/v2/url?u=http-3A__brainvis.wustl.edu_workbench_standard-5Fmesh-5Fatlases.zip&d=CwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=pD-66cIQmGp-LCnXHOuQdXLFWentmarhbv425YgOoYg&m=RUcejLaqj3iGyRtQurA1chDeTpU1L_b2NehUQWsoNm0&s=7atn0bADAEROsopEMaHJkTCjKE94fn4coAnhoeGwEug&e=>) > into MATLAB using gifti, however this file only contained the following > fields: > > g = gifti(‘fsaverage6_std_sphere.L.41k_fsavg_L.surf.gii’) > > > > g = > > > > faces: [81920x3 int32] > > mat: [4x4 double] > > vertices: [40962x3 single] > > > > I couldn’t replace g.mat (‘Invalid Coordinate System Transform Matrix’) so > I added a ‘data’ field using: g(:).data = corr_mat; (this is my > 81924x81924 vertex by vertex connectivity matrix). > > > > ciftisavereset then gave me the following error: > > > > <cmd path>/bin_rh_linux64/wb_command: line 14: 17416 Aborted > (core dumped) “$directory/../exe_rh_linux64/wb_command “$@” > > > > Have I gone about it the right way? > > > > Thanks for your help, > > Rodrigo > > > > > > > > > > > > *From: *Timothy Coalson <tsc...@mst.edu> > *Date: *Thursday, 8 September 2016 at 19:50 > *To: *Rodrigo <rbr...@fas.harvard.edu> > *Cc: *"hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> > *Subject: *Re: [HCP-Users] Converting an FC matrix into dconn.nii > > > > There are a few ways to do this, the simplest may be to use > ciftisavereset, followed by -cifti-change-mapping. > > > > First, you need a file with the grayordinates space (only needs to be on > one dimension). Load it into matlab via ciftiopen (#2 at > https://wiki.humanconnectome.org/display/PublicData/HCP+Users+FAQ > <https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.humanconnectome.org_display_PublicData_HCP-2BUsers-2BFAQ&d=CwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=pD-66cIQmGp-LCnXHOuQdXLFWentmarhbv425YgOoYg&m=9DbsQLeEtC9gcdJ50HtBmEci0DRbUVPmXUNAx5mcPiw&s=haSw-6_ynTOKtRd9qSRwpADVrdObQ7SIc9VecJUjQt0&e=>), > replace the data matrix with the one you computed, and save it with > ciftisavereset with a .dtseries.nii extension. This will have the matrix, > but it thinks it is a timeseries. You can then fix it with this: > > > > wb_command -cifti-change-mapping bigmatrix.dtseries.nii ROW > bigmatrix.dconn.nii -from-cifti bigmatrix.dtseries.nii COLUMN > > > > Then delete the dtseries version. > > > > Tim > > > > > > > > On Thu, Sep 8, 2016 at 6:24 PM, Braga, Rodrigo Martin < > rbr...@fas.harvard.edu> wrote: > > Dear HCP experts, > > > > I have a vertex by vertex functional connectivity matrix, computed in > MATLAB, that I would like to convert to a .dconn.nii file so that I can > view the FC of each vertex interactively using wb_view. > > > > I cannot find a wb_command that will let me do this. I thought of using > ‘wb_command –cifti-replace-structure’ , however a) there doesn’t seem to be > an example dconn.nii file in the HCP_WB_Tutorial_1.0/ dataset that I can > hack, and b) my matrix is based on the fsaverage6 template, so I assume I > need to create the dconn file from scratch. > > > > Is there a way to do this? > > > > Any help would be much appreciated, > > Rodrigo > > > > > > > > _______________________________________________ > HCP-Users mailing list > HCP-Users@humanconnectome.org > http://lists.humanconnectome.org/mailman/listinfo/hcp-users > <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailman_listinfo_hcp-2Dusers&d=CwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=pD-66cIQmGp-LCnXHOuQdXLFWentmarhbv425YgOoYg&m=9DbsQLeEtC9gcdJ50HtBmEci0DRbUVPmXUNAx5mcPiw&s=vfZ0Ktj_HACuWThB_22o5h7v0ktHBpy9Huvs7lrAtZQ&e=> > > > > > _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users