Skip to main content

Image-guided surgery functions, in C++, using OpenCV and wrapped in Python.

Project description

scikit-surgeryopencvcpp

Build Status Build status

scikit-surgeryopencvcpp implements image guided surgery algorithms, using OpenCV, in C++ and wrapped in Python.

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

Features

Installing

You can pip install the latest Python package as follows:

pip install scikit-surgeryopencvcpp

Examples

Surface Reconstruction

pip install pptk opencv-python scikit-surgeryopencvcpp
python
import sksurgeryopencvpython as skscv
import pptk
import numpy as np
import cv2
left_image = cv2.imread('Testing/Data/reconstruction/f7_dynamic_deint_L_0100.png')
right_image = cv2.imread('Testing/Data/reconstruction/f7_dynamic_deint_R_0100.png')
left_intrinsics = np.loadtxt('Testing/Data/reconstruction/calib.left.intrinsic.txt')
right_intrinsics = np.loadtxt('Testing/Data/reconstruction/calib.right.intrinsic.txt')
l2r = np.loadtxt('Testing/Data/reconstruction/calib.l2r.4x4')
rotation_matrix = l2r[0:3, 0:3]
translation_vector = l2r[0:3, 3:4]
points = skscv.reconstruct_points_using_stoyanov(left_image, left_intrinsics, right_image, right_intrinsics, rotation_matrix, translation_vector, False)
points_3d = points[:,0:3]
v = pptk.viewer(points_3d)

Developing

Cloning

You can clone the repository using the following command:

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

Build instructions

Still not for the faint-hearted. It depends if you are a C++ developer familiar with CMake or a hybrid C++/Python developer primarily interested in writing Python extensions.

The simplest advice really is to read appveyor.yml, as this will always be up to date.

Preferred Branching Workflow for Contributions.

We welcome contributions to this project. Please use the following workflow.

  1. Raise issue in this project's Github Issue Tracker.
  2. Fork repository.
  3. Create a feature branch called <issue-number>-<some-short-description> replacing <issue-number> with the Github issue number and <some-short-description> with your description of the thing you are implementing.
  4. Code on that branch.
  5. Push to your remote when ready.
  6. Create pull request.
  7. We will review code, suggest and required changes and merge to master when it is ready.

Dashboards

In addition to Travis and Appveyor builds, C++ results are also submitted to a public CDash dashboard.

Licensing and copyright

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

Acknowledgements

Supported by Wellcome and the EPSRC.

The project was generated, using CMakeCatchTemplate and CMakeTemplateRenamer.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

scikit_surgeryopencvcpp-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl (5.2 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-win_amd64.whl (15.9 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.7m Windows x86

scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-macosx_10_9_x86_64.whl (5.2 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-win_amd64.whl (16.1 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.6m Windows x86

scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-macosx_10_9_x86_64.whl (5.2 MB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

scikit_surgeryopencvcpp-0.0.13-cp35-cp35m-win_amd64.whl (16.1 MB view hashes)

Uploaded CPython 3.5m Windows x86-64

scikit_surgeryopencvcpp-0.0.13-cp35-cp35m-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.5m Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page