Common 3D Slicer Infrastructure for Interactive Landmark Placement
Objectives: To develop a common infrastructure, MarkupConstraints extension, to customize the interactive placement of landmarks identified for volumetric image or surface mesh registration, or quantitative modules of 3D Slicer open source software. Methods: 3D Slicer is both a local desktop software to solve advanced image computing challenges with a focus on clinical and biomedical applications, as well as a development platform to build and deploy custom solutions for research and commercial products, using open source software. We created MarkupsConstraints as a Slicer module and logic with appropriate observers for applying constraints and refined the application programming interface to support arbitrary constraints and dependencies. This new infrastructure enables interoperation between modules, and supports serialization/deserialization of constrained markup nodes. Results: A new ControlPoint type was created to refer to a single control point within a markup node. Constraints were then applied to ControlPoint instances. Observer callbacks then identify the particular control points within the modified node that are affected, and invoke constraints on dependent control points. Adaptors like ControlPoint may be created for other interactive components in 3D Slicer and would be handled by the same MarkupConstraints module. Python exceptions and logging are used for all error reporting; as this module is only a development tool, it should be the responsibility of the Slicer modules to catch errors and present meaningful, contextual, messages to the user. Conclusions: The MarkupsConstraint is a new open source module built as a Python extension for ease of development and so the module is not locked to the 3D Slicer release schedule. It allows the customization of interactive placement of landmarks identified for volumetric image or surface mesh registration, or quantitative modules of 3D Slicer open source software. In the future, when these features are more mature, it may be sensible to move this functionality into Slicer core for ease of use.