/scikit-surgerysurfacematch

Tools for reconstructing and matching surfaces represented as point clouds.

Primary LanguagePythonOtherNOASSERTION

scikit-surgerysurfacematch

Logo

GitHub Actions CI status Coveralls coverage status Documentation Status

Author: Matt Clarkson

scikit-surgerysurfacematch is part of the SNAPPY software project, developed at the Wellcome EPSRC Centre for Interventional and Surgical Sciences, part of University College London (UCL).

scikit-surgerysurfacematch supports Python 3.6 - 3.8

scikit-surgerysurfacematch contains algorithms that are useful in stereo reconstruction from video images, and matching to a pre-operative 3D model, represented as a point cloud.

Features

  • Base classes (pure virtual interfaces), for video segmentation, stereo reconstruction, rigid registration / pose estimation.
  • A base class to handle rectification properly, and the right coordinate transformation, to save you the trouble.
  • Stereo reconstruction classes based on Stoyanov MICCAI 2010, and OpenCV SGBM reconstruction, using above interface, and both allowing for optional masking.
  • Rigid registration using PCL's ICP implementation, which is wrapped in scikit-surgerypclcpp
  • Rigid registration using GoICP, which is wrapped in scikit-surgerygoicp
  • A pipeline to combine the above, segment a video pair, do reconstruction, and register to a 3D model, where each part can then be swapped with whatever implementation you want, as long as you implement the right interface.
  • A pipeline to take multiple stereo video snapshots, do surface reconstruction, mosaic them together, and then register to a 3D model. Again, each main component (video segmentation, surface reconstruction, rigid registration) is swappable. Inspired by: [Xiaohui Zhang's](https://doi.org/10.1007/s11548-019-01974-6) method.

Developing

Cloning

You can clone the repository using the following command:

git clone https://github.com/UCL/scikit-surgerysurfacematch

Running tests

Pytest is used for running unit tests:

pip install pytest
python -m pytest

Linting

This code conforms to the PEP8 standard. Pylint can be used to analyse the code:

pip install pylint
pylint --rcfile=tests/pylintrc sksurgerysurfacematch

Installing

You can pip install directly from the repository as follows:

pip install git+https://github.com/UCL/scikit-surgerysurfacematch

Contributing

Please see the contributing guidelines.

Useful links

Licensing and copyright

Copyright 2020 University College London. scikit-surgerysurfacematch is released under the BSD-3 license. Please see the license file for details.

Acknowledgements

Supported by Wellcome and EPSRC.