BioMedIA / MIRTK

The Medical Image Registration ToolKit (MIRTK), the successor of the IRTK, contains common CMake build configuration files, core libraries, and basic command-line tools. Extension packages are hosted by the MIRTK GitHub group at
https://github.com/MIRTK
Apache License 2.0
186 stars 71 forks source link

fix: merge-surfaces creation of small holes at label boundary #750

Closed schuhschuh closed 3 years ago

schuhschuh commented 3 years ago

This PR patches change #744 to only introduce a single hole in each surface to be merged for each (largest) connected component of the label boundary. It also avoids removing cells when this would leave surface triangles that are only connected by a single vertex but not an edge.

With this PR, mirtk recon-neonatal-cortex should no longer produce the error:

Exception: Merged surface is non-closed, no. of boundaries: N

At the intersection where the cortical surfaces are merged.

Screen Shot 2020-11-22 at 3 34 21 AM Screen Shot 2020-11-22 at 3 31 33 AM

CC @jcupitt @amakropoulos