Skip to content

Conversation

@jordandekraker
Copy link
Collaborator

In principle this is a pretty simple fix, we just take out the extra dilated nan mask and then find a way to remove the unwanted components of the surface. This would be better than postprocessing to patch holes since it allows for a smooth&curvy surface.
image
Here i tried keeping the second largest connected component but it must be connected somewhere because that effectively removes the whole thing
Would also need to remove from dg:
image
some other masking of the bg might work, will look into it later

@jordandekraker
Copy link
Collaborator Author

I think i was tired when i tried the "second largest CC" mask last week. An easier way is to get the largest CC of invalid vertices (i.e. those outside of the coords mask), and discard those. This keeps the surface intact in holes (which are islands of invalid vertices).

I think this is pretty simple and elegant, doesn't introduce any new parameters or dependencies, and adds negligible processing time.

Let me know how it works in your test cases @akhanf

@akhanf
Copy link
Member

akhanf commented Jul 21, 2025

Sounds good will give it a whirl. Logic seems sound to me.

@akhanf akhanf changed the title fill holes at src-sink contact updated approach for open isosurface creation Jul 24, 2025
@akhanf
Copy link
Member

akhanf commented Jul 24, 2025

merging this in -- fyi I changed the title to describe the change

@akhanf akhanf merged commit 767f60c into dev-v2.0.0 Jul 24, 2025
3 checks passed
Dhananjhay pushed a commit that referenced this pull request Aug 5, 2025
* no coords masking; instead remove outersurf by removing the largest connected component of outside (invalid) vertices
* improved robustness for holes in mesh
note: reducing the voxel size for laminar_coords_res usually fixes any residual holes
Dhananjhay pushed a commit that referenced this pull request Aug 18, 2025
* no coords masking; instead remove outersurf by removing the largest connected component of outside (invalid) vertices
* improved robustness for holes in mesh
note: reducing the voxel size for laminar_coords_res usually fixes any residual holes
@jordandekraker jordandekraker deleted the isosurf_patch branch September 8, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants