visualize*.gii on a surface with a colorbar that scales in proportion to the color intensity

386 views
Skip to first unread message

Shruti Kinger

unread,
Aug 28, 2025, 1:56:17 PM (10 days ago) Aug 28
to HCP-Users
Dear Team,

I have a *.gii file which contains a thresholded cluster generated from surface based morphometry anlaysis on SPM. Can anyone provide guidance regarding how to visualise it on a surface with a colourbar that scales in proportion to the colour in connectome workbench? I tried to overlay the file on 100307.R.midthickness.32k_fs_LR.surf.gii on workbench but it showed an error that all data must have same number of rows. I have attached the .gii file and its specifications (As screenshot) for your reference.

Thank you for your time and consideration.


Thanks,
Shruti
.gii specifications.png
SBM_attneg2.gii

Tim Coalson

unread,
Aug 28, 2025, 6:39:24 PM (10 days ago) Aug 28
to hcp-...@humanconnectome.org
From the number of vertices in your matlab screenshot, it appears that some step in the process concatenated left and right hemisphere data, while everything we do in workbench assumes the hemisphere surfaces stay logically separate (and for gifti, this means physically separate files).  You need to separate the data again into left-only and right-only matrices in order to save them as gifti files that will display in wb_view.

As an aside, cifti files can contain data from both hemispheres and will display in wb_view on surfaces, but creating them is a little more involved than concatenating the data (they have the ability to exclude things like the medial wall, so the header needs to contain the information of what vertices were actually used, formatted a certain way).

Tim


--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/13e7612f-cea4-45bb-8a20-668e506e4ee4n%40humanconnectome.org.

Tim Coalson

unread,
Aug 28, 2025, 6:45:54 PM (10 days ago) Aug 28
to hcp-...@humanconnectome.org
It also looks like you have data and coordinates in a single gifti file.  wb_view doesn't accept that, the data values should be saved without anything else in the file.  Having the coordinates and data values in separate files makes it less confusing to select the appropriate surfaces for display versus processing (midthickness for surface operations, white/pial for volume surface outlines, inflated for 3D surface rendering so that the folds don't hide anything interesting).

Tim

Shruti Kinger

unread,
Aug 29, 2025, 7:44:56 AM (9 days ago) Aug 29
to hcp-...@humanconnectome.org
Thank you very much. It was helpful. I separated the left and right hemisphere data and their faces/vertices to overlay the cluster and created the *.func.gii (metric) and *.surf.gii (surface) respectively for each of the two hemispheres. I have attached the code in case someone else faces this issue while visualising the thresholded cluster (generated on SPM) on the workbench.

Is there a way to visualise the file by flattening the folds of the .surf.gii created? Does the workbench/console have any such feature so that the region can be better visualised?

Thanks,
Shruti


You received this message because you are subscribed to a topic in the Google Groups "HCP-Users" group.
To unsubscribe from this topic, visit https://groups.google.com/a/humanconnectome.org/d/topic/hcp-users/EuATgmoLYRw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/CANm3QU5CqeBif--ux3wb%3DBrDOodHZ82JCBDiREzbma07v8tm5Q%40mail.gmail.com.
separate_left_right_hemisphere_surface.m

Tim Coalson

unread,
Aug 29, 2025, 4:52:26 PM (9 days ago) Aug 29
to hcp-...@humanconnectome.org
If you have the outputs of running the HCP pipelines on these subjects, you should have inflated surfaces in the subjects' folders that are useful for display.  You can also display 32k fs_LR data on something like the HCP-YA group average inflated surface.

If you don't have these, you can mess with wb_command -surface-generate-inflated to make ad-hoc inflated surfaces.  You can take the parameters from the pipelines to match what would have been generated:


InflateExtraScale is probably 1.

We also do have a flatmap surface:


colin.cerebral.L.flat.32k_fs_LR.surf.gii
colin.cerebral.R.flat.32k_fs_LR.surf.gii

Tim


Shruti Kinger

unread,
Aug 29, 2025, 5:47:42 PM (9 days ago) Aug 29
to hcp-...@humanconnectome.org
Thank you again. I have created the flat surface using the wb_command -surface-generate-inflated.

Shruti



Reply all
Reply to author
Forward
0 new messages