README.rst 3.9 KB
Newer Older
1 2 3
scikit-surgerynditracker
===============================

Stephen Thompson's avatar
Stephen Thompson committed
4
.. image:: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/raw/master/project-icon.png
5 6
   :height: 128px
   :width: 128px
Stephen Thompson's avatar
Stephen Thompson committed
7
   :target: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker
8

Mian Ahmad's avatar
Mian Ahmad committed
9
.. image:: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/badges/master/pipeline.svg
Stephen Thompson's avatar
Stephen Thompson committed
10
   :target: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/pipelines
11 12
   :alt: GitLab-CI test status

Stephen Thompson's avatar
Stephen Thompson committed
13 14
.. image:: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/badges/master/coverage.svg
    :target: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/commits/master
15 16 17 18 19 20 21 22
    :alt: Test coverage

.. image:: https://readthedocs.org/projects/scikit-surgerynditracker/badge/?version=latest
    :target: http://scikit-surgerynditracker.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status



23
scikit-surgerynditracker is a python interface for Northern Digital (NDI) trackers. It should work with Polaris Vicra, Spectra, and Vega optical trackers and Aurora electromagnetic trackers. Tracking data is output as NumPy arrays.
24 25 26 27 28 29 30 31 32 33 34

Author: Stephen Thompson

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


Installing
----------

::

35
    pip install scikit-surgerynditracker
36

37 38
Using
-----
39 40 41 42 43
Configuration is done using Python libraries at instantiation. Invalid
configuration should raise exceptions. Tracking data is returned in a set of
lists, containing the port handles, timestamps, framenumbers, the tracking data
and a tracking quality metric. By default tracking data is returned as a 4x4 NumPy array,
though can be returned as a quaternion by changing the configuration.
Stephen Thompson's avatar
Stephen Thompson committed
44

45
::
Stephen Thompson's avatar
Stephen Thompson committed
46

47 48 49 50 51
    from sksurgerynditracker.nditracker import NDITracker
    SETTINGS = {
        "tracker type": "polaris",
        "romfiles" : ["../data/8700339.rom"]
            }
52
    TRACKER = NDITracker(SETTINGS)
53 54

    TRACKER.start_tracking()
55 56 57
    port_handles, timestamps, framenumbers, tracking, quality = TRACKER.get_frame()
    for t in tracking:
      print (t)
58 59 60
    TRACKER.stop_tracking()
    TRACKER.close()

61
See demo.py for a full example
62 63 64 65 66 67 68 69 70 71 72

Developing
----------

Cloning
^^^^^^^

You can clone the repository using the following command:

::

Stephen Thompson's avatar
Stephen Thompson committed
73
    git clone https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112


Running the tests
^^^^^^^^^^^^^^^^^

You can run the unit tests by installing and running tox:

::

    pip install tox
    tox

Contributing
^^^^^^^^^^^^

Please see the `contributing guidelines`_.


Useful links
^^^^^^^^^^^^

* `Source code repository`_
* `Documentation`_


Licensing and copyright
-----------------------

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


Acknowledgements
----------------

Supported by `Wellcome`_ and `EPSRC`_.


.. _`Wellcome EPSRC Centre for Interventional and Surgical Sciences`: http://www.ucl.ac.uk/weiss
Stephen Thompson's avatar
Stephen Thompson committed
113
.. _`source code repository`: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker
114 115 116 117 118
.. _`Documentation`: https://scikit-surgerynditracker.readthedocs.io
.. _`SNAPPY`: https://weisslab.cs.ucl.ac.uk/WEISS/PlatformManagement/SNAPPY/wikis/home
.. _`University College London (UCL)`: http://www.ucl.ac.uk/
.. _`Wellcome`: https://wellcome.ac.uk/
.. _`EPSRC`: https://www.epsrc.ac.uk/
Stephen Thompson's avatar
Stephen Thompson committed
119 120
.. _`contributing guidelines`: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/blob/master/CONTRIBUTING.rst
.. _`license file`: https://weisslab.cs.ucl.ac.uk/WEISS/SoftwareRepositories/SNAPPY/scikit-surgerynditracker/blob/master/LICENSE
121