Edit this page

NA-MIC Project Weeks

Back to Projects List

Robust boolean operations library for VTK/Slicer

Key Investigators

Project Description

Support robust boolean operations for 2D triangle meshes inside VTK or Slicer through an external library. This would allow an alternative to current boolean operations engine, vtkbool (from Sandbox’s extension CombineModels module), which is better than the default one of vtk but still unstable for complex meshes such as the ones used in the biomedical domain

Objective

  1. Expose a robust boolean operations library (e.g. Geogram) in Slicer’s logic and GUI
  2. Compile a robust boolean operations library (e.g. Geogram) as a vtk external module

Approach and Plan

  1. Add a CLI module for Slicer that encapsulates a robust boolean operation command line as part of Sandbox extension.
  2. Create a draft PR to the upstream repo with the code changes that incorporate the feature and documentation on how to use it from GUI and a code snippet on how to use it from the python interpreter
  3. If there is enough time, evaluate creating a boolean operations DynamicModeler tool

Progress and Next Steps

  1. Table that compares most “popular” boolean operations libraries from the awesome geometry processing projects list: https://docs.google.com/spreadsheets/d/1tWbNuMz7vTIB2efFZE7YdT4vBmRb45DdQlqy_kda32k/edit?usp=sharing
  2. Tested geogram successfully with mesh that made vtkbool fail
  3. Edited the CombineModels module to allow other boolean operations backend, manifold through trimesh python module
  4. Discussed with the team how to expose geogram library to Slicer, mostly CMake related issues.
  5. Achieved creation of a CLI module to execute geogram boolean operations that will be later added to Sandbox extensions
  6. Next steps are to make all these alternative backends available on CombineModels module as a PRs. This will involve modifying Sandbox extension to be a superbuild extension

Illustrations

Boolean operation example

Boolean operation example

Boolean operation result

Working CLI module exposing geogram

geogram_CLI_module

Background and References