Logo GitLab-CI test status Test coverage Documentation Status

Author: Stephen Thompson

SnappySonic can be used as an ultrasound acquisition simulator. The output from a tracking system (NDI or AruCo tags) is to select a frame of pre-recorded video to show. A suitable video of ultrasound data is included in the data directory, however the user can select a video of their choosing.

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

SnappySonic supports Python 3.6.

pip install snappysonic
python --config config.json

The config file defines the tracking parameters and image buffer, e.g.

 "ultrasound buffer": "data/usbuffer.mp4",
       "buffer descriptions": [
               "name": "glove",
               "start frame": 0,
               "end frame": 284,
               "x0": 20, "x1": 200,
               "y0": 200, "y1": 260,
               "scan direction": "x"
  "tracker config": {
              "tracker type": "aruco",
              "video source": 2,
              "debug": true,
              "capture properties": {
                      "CAP_PROP_FRAME_WIDTH": 640,
                      "CAP_PROP_FRAME_HEIGHT": 480


An example configuration file can be downloaded from here and an image buffer from source code repository data directory



You can clone the repository using the following command:

git clone

Running tests

Unit tests are performed in stand alone environments using tox, which also checks coding style.



You can pip install from pypi with

pip install snappysonic

or You can pip install directly from the repository as follows:

pip install git+


Please see the contributing guidelines.