Metadata-Version: 2.1
Name: pyigtl
Version: 0.3.1
Summary: Python interface for OpenIGTLink
Home-page: https://github.com/lassoan/pyigtl
Download-URL: https://github.com/lassoan/pyigtl/archive/master.zip
Author: Andras Lasso, Daniel Hoyer Iversen, Kyle Sunderland
Author-email: lasso@queensu.ca
Maintainer: Andras Lasso
Maintainer-email: lasso@queensu.ca
Keywords: openigtlink igt medical imaging
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: System :: Networking
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

[![Python package](https://github.com/lassoan/pyigtl/workflows/Python%20package/badge.svg)](https://github.com/lassoan/pyigtl/actions?query=workflow%3A%22Python+package%22)
![Upload Python Package](https://github.com/lassoan/pyigtl/workflows/Upload%20Python%20Package/badge.svg)
[![PyPI version](https://badge.fury.io/py/pyigtl.svg)](https://badge.fury.io/py/pyigtl)

# *pyigtl*

Python implementation of [OpenIGTLink](http://openigtlink.org/), a lightweight real-time data transfer protocol developed for image-guided therapy applications (surgical navigation, image-guided surgery, ultrasound-guided interventions, etc.).

Tested with [3D Slicer](https://www.slicer.org), [SlicerIGT](https://www.slicerigt.org) and [PLUS Toolkit](http://plustoolkit.org/).

Supports latest OpenIGTLink protocol (version 3) and message types: IMAGE, TRANSFORM, STRING, POINT.

## Installation

Using [pip](https://pip.pypa.io/en/stable/):

```
pip install pyigtl
```

## Example

Wait until a message is received from a device named `ToolToReference` and print the message content:

```
import pyigtl
client = pyigtl.OpenIGTLinkClient("127.0.0.1", 18944)
message = client.wait_for_message("ToolToReference", timeout=5)
print(message)
```
