Python interface for OpenIGTLink
Project description
pyigtl
Python implementation of OpenIGTLink, 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 and PLUS Toolkit.
Implemented message types: IMAGE, TRANSFORM, STRING, POINT. Supports latest OpenIGTLink protocol (version 3), including custom metadata fields.
Installation
The package is not yet available on PyPI or conda, therefore you need to download the files to your computer and add it to PYTHONPATH
environent variable (for example, PYTHONPATH=c:/dev/pyigtl
) before starting Python. Alternatively, you can add the module path in your Python code before importing pyigtl, for example:
import sys
sys.path.append("c:/dev/pyigtl")
Example
Wait until a message is received from a device named ToolToReference
and print the message content:
from pyigtl.comm import OpenIGTLinkClient
client = OpenIGTLinkClient(host="127.0.0.1", port=18944)
message = client.wait_for_message("ToolToReference")
print(message)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyigtl-0.1.0rc0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8daafcf623b965648869329cca528e856da1eb0dafd2412739681a80b58f2702 |
|
MD5 | 316ad9a79f448019c521de3122a1a772 |
|
BLAKE2b-256 | f66622c7ef7f7f82d2cdbfb032bce6b004932577b5cdb7a7bb370081eb6f9e1f |