
I would zero out overlapping vertices and then use surface dilation to fill in the gaps programmatically. This is what we did for the HCP’s multi-modal cortical parcellation.
Matt.
From:
Johanne <iversen...@gmail.com>
Reply-To: "hcp-...@humanconnectome.org" <hcp-...@humanconnectome.org>
Date: Friday, September 26, 2025 at 8:46 AM
To: HCP-Users <hcp-...@humanconnectome.org>
Subject: [hcp-users] Drawing neighboring surface ROIs, getting overlapping areas
Hi all,
We are working on defining neighboring surface ROIs in wb_view, but we’ve encountered a problem. Specifically, we’re either getting overlapping vertices between the neighboring ROIs or gaps forming between them. In other words, we end up either double-counting
certain surface areas or missing some vertices entirely.
We first draw one border and create an ROI. After that, we repeat the process for the remaining ROIs. That means there are two borders between each of the neighboring ROIs.
The picture illustrates our dream scenario, and our current solution, respectively.

Are any of you familiar with a way of closing a new border with an existing border? Or, does anyone know if there is another way of drawing ROIs next to each other without encountering this problem?
Kind regards,
Johanne
--
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/fde27df8-a444-4f8e-9f49-d7e5d0385d97n%40humanconnectome.org.
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
Hi!
Thank you for getting back to us so quickly. We made a script to zero out the overlapping vertices, and tried using wb_command -label-dilate.
However, when we looked into the specific overlapping vertices, something seemed off. We therefore ran a test, and found that the overlapping vertices in our tabular output do not match up with the graphics in wb_view. The tabular output itself is also surprising. It says that we have 0 vertices in our labels, whereas graphically we expected 6 vertices.
Please see the illustration:

Note:
ROI A: 17 vertices in border, 0 in label
ROI B: 12 vertices in border, 0 in label
Here is a brief explanation of what we have done:
HCP preprocessing pipeline
fMRI analysis in matlab
Drawn on fsaverage 32k sphere in wb_view
Edit borders - Draw - Finish - Save as border file
Create ROI - save as dlabel
Save/manage files - save selected
Use wb_command -border-to-vertices and -surface-vertex-areas to convert vertices to area.
Script in MATLAB to identify number of vertices, overlapping vertices, and surface area (using midthickness.32k_fs_LR.surf.gii)
We have doublechecked our findings, that we have used the same surfaces, and looked into the scripts, but we cannot see any obvious mistakes (at least not obvious to us).
Has anyone experienced something similar? Or can you think of an explanation as to why our graphics and numbers diverge?
Kind regards,
Johanne
Hi!
Thank you for getting back to us so quickly. We made a script to zero out the overlapping vertices, and tried using wb_command -label-dilate.
However, when we looked into the specific overlapping vertices, something seemed off. We therefore ran some tests, and found that the overlapping vertices in our tabular output does not match up with the graphics in wb_view. The tabular output itself is also surprising. It says that we have 0 vertices in our labels, whereas graphically we expected 6 vertices.
Please see the illustration:
Note:
ROI A: 17 vertices in border, 0 in label
ROI B: 12 vertices in border, 0 in labe
Here is a brief explanation of what we have done:
HCP preprocessing pipeline
fMRI analysis in matlab
Drawn on fsaverage 32k sphere in wb_view
Edit borders - Draw - Finish - Save as border file
Create ROI - save as dlabel
Save/manage files - save selected
Use wb_command -border-to-vertices and -surface-vertex-areas to convert vertices to area.
Script in MATLAB to identify number of vertices, overlapping vertices, and surface area (using midthickness.32k_fs_LR.surf.gii)
We have doublechecked our findings, that we have used the same surfaces, and looked into the scripts, but we cannot see any obvious mistakes (at least not obvious to us).
Has anyone experienced something similar? Or can you think of an explanation as to why our graphics and numbers diverge?
Kind regards,
Johanne
fredag 26. september 2025 kl. 18:23:49 UTC+2 skrev glas...@wustl.edu:
Thank you so much for your replies so far.
We’re still unsure about some things. Just to give you some more context; what we are doing is drawing retinotopic maps based on the same experimental design and task as “The Human Connectome Project 7 Tesla retinotopy dataset”, using the same population receptive field analysis. Our goal is to draw V1, V2 and V3 on individual subjects and calculate the surface areas of each drawn ROI.
The input fMRI data in the pRF model is in 32k resolution, and when drawing in Workbench with this resolution the labels become quite “patchy” with large gaps in between (see pictures below). When calculating the areas (using -surface vertex areas) based on -border to rois there is no overlap between the ROIs, while when including the -incl border flag (or add the outline with -border to vertices) it becomes a lot of overlap. Is it correct that the “gaps” created between the ROIs (without the borders) are due to the uncertainty in these areas due to the “low” resolution?



If so, what we need to figure out is how to deal with these uncertainty-gaps when we are calculating our areas. You suggest that we “zero out overlapping vertices and then use surface dilation to fill in the gaps programmatically”, what specifically do you mean with this? Is this a command? What would be the underlaying logic of which ROI specific vertices belong to?
We were also thinking of resampling to 164k resolution, as the labels then will be filled in, but then we don’t really have any control over how they are filled. What do you think?
Thank you again for your help!