Skip to main content

trame-slicer library

Project description

trame-slicer

Welcome to trame-slicer

trame-slicer is a Python library bringing 3DSlicer components in trame as a composable library.

It uses 3D Slicer's python wrapping and adds a thin wrapping to make it available with the trame framework.

Warning

As the 3D Slicer Python wheel is not yet generated by the 3D Slicer CI, manually generated wheels are provided for Python 3.10 for Windows and Linux WSL.

The API has not been stabilized / reviewed by the 3D Slicer core developers so please use this library with caution.

Installing

The library can be installed as follows :

  • Setup a Python 3.10 environment
  • Activate your environment
  • Git clone the library
  • cd into the library
  • Use the [pip install -e . command]{.title-ref} to install the library along it's dependencies
  • Copy the vtk_mrml wheel file matching your OS
  • Pip install the wheel using the find links command (see below)
pip install -e .
pip install vtk_mrml-9.4.0-cp310-cp310-win_amd64.whl  --find-links . # Windows
pip install vtk_mrml-9.4.0-cp310-cp310-manylinux_2_35_x86_64.whl  --find-links . # Linux WSL

Getting started

To get started using trame, please have a look at the introductory trame course.

To start using the trame-slicer library, have a look and run the medical viewer app

Features

The following subset of 3D Slicer features are currently supported :

  • (limited) file loading
  • Volume files (DCM, NRRD, NIFTI, ...)
  • Model files (STL, OBJ)
  • MRML / MRB files
  • Segmentations (NRRD, NIFTI, ...)
  • Display
    • 2D/3D with 3D Slicer UI manipulation
    • Volume Rendering preset / shift
  • Bare bone access to 3D Slicer MRML scene and Core logic components

Work in progress

To make it easier for users to use trame-slicer, the following work are in progress :

  • Slicer wheel generation merge into 3D Slicer's preview release
  • CI changes to build the Slicer wheel along 3D Slicer's release
  • 3D Slicer extension to install trame-slicer and launch a trame-slicer server directly from 3D Slicer

Troubleshooting

If you get the following error:

ImportError: cannot import name 'vtkMRMLDisplayableNode' from 'slicer' (XXX/lib/python3.10/site-packages/slicer/__init__.py)

You might be using a statically compiled Python. Please switch to a shared version of Python.

Contributing

Contributions are welcomed, please follow the CONTRIBUTING.md file for more information.

License

The library is distributed with a permissive license. Please look at the LICENSE file for more information.

Acknowledgment

This library was funded by the following projects :

This library was created from the trame-cookicutter library.

Contact

If you are interested in learning how you can use trame-slicer for your use case in the near future, or want to get an early start using the framework, don't hesitate to contact us. Or reach out in the issue tracker and 3DSlicer discourse community.

Project details


Download files

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

Source Distribution

trame_slicer-0.5.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trame_slicer-0.5.0-py3-none-any.whl (880.9 kB view details)

Uploaded Python 3

File details

Details for the file trame_slicer-0.5.0.tar.gz.

File metadata

  • Download URL: trame_slicer-0.5.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trame_slicer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 02256895827ca32ef86a5b5cd459e984338951caa1900f0d23451031ec25f748
MD5 e42fc25a8235eafc8cc5c55b07026750
BLAKE2b-256 e004ed318a9f74f5e10d57acbda000cb78cf6e0772398b28b582245a6b1f27ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame_slicer-0.5.0.tar.gz:

Publisher: test_and_release.yml on KitwareMedical/trame-slicer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trame_slicer-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: trame_slicer-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 880.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trame_slicer-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 966794c7fad09ff902270d6a62e1ac4d39bb1262b51f837ac52544f2b4a4db08
MD5 38d7bf393707f79ad7a88f1af6bec95c
BLAKE2b-256 e0cc3ffcfeb5c17a7a672011bad439db36c529c58fa45dd6f1e71f40333804a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame_slicer-0.5.0-py3-none-any.whl:

Publisher: test_and_release.yml on KitwareMedical/trame-slicer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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