# trame-slicer

trame-slicer is a Python library bringing
[3DSlicer](https://github.com/Slicer/Slicer/) 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](https://github.com/Kitware/trame/).
## 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)
```console
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](https://kitware.github.io/trame/guide/intro/course.html).
To start using the trame-slicer library, have a look and run the
[medical viewer app](examples/medical_viewer_app.py)
## 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](https://github.com/KitwareMedical/trame-slicer/blob/main/CONTRIBUTING.md)
file for more information.
## License
The library is distributed with a permissive license. Please look at the
[LICENSE](https://github.com/KitwareMedical/trame-slicer/blob/main/LICENSE) file
for more information.
## Acknowledgment
This library was funded by the following projects :
- [Cure Overgrowth Syndromes (COSY) RHU Project (ANR-18-RHUS-005)](https://rhu-cosy.com/en/accueil-english/).
- [Handling heterogeneous Imaging and signal data for analysing the Neurodevelopmental Trajectories of premature newborns (HINT) ANR project (ANR-22-CE45-0034)](https://anr-hint.pages.in2p3.fr/)
This library was created from the
[trame-cookicutter](https://github.com/Kitware/trame-cookiecutter/) 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](https://www.kitware.eu/contact/). Or reach out in the
[issue tracker](https://github.com/KitwareMedical/trame-slicer/issues) and
[3DSlicer discourse community](https://discourse.slicer.org/).
Raw data
{
"_id": null,
"home_page": null,
"name": "trame-slicer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "3DSlicer, Application, Framework, Interactive, Medical, Python, Web",
"author": null,
"author_email": "Alexy Pellegrini <alexy.pellegrini@kitware.com>, Jonathan Bouyer <jonathan.bouyer@kitware.com>, Thibault Pelletier <thibault.pelletier@kitware.com>",
"download_url": "https://files.pythonhosted.org/packages/ef/bb/5a4e2677a8e8db62c675082e359802529ad0cd614dac2c6a838af9cf3577/trame_slicer-1.1.0.tar.gz",
"platform": null,
"description": "# trame-slicer\n\n\n\ntrame-slicer is a Python library bringing\n[3DSlicer](https://github.com/Slicer/Slicer/) components in trame as a\ncomposable library.\n\nIt uses 3D Slicer\\'s python wrapping and adds a thin wrapping to make it\navailable with the [trame framework](https://github.com/Kitware/trame/).\n\n## Warning\n\nAs the 3D Slicer Python wheel is not yet generated by the 3D Slicer CI, manually\ngenerated wheels are provided for Python 3.10 for Windows and Linux WSL.\n\nThe API has not been stabilized / reviewed by the 3D Slicer core developers so\nplease use this library with caution.\n\n## Installing\n\nThe library can be installed as follows :\n\n- Setup a Python 3.10 environment\n- Activate your environment\n- Git clone the library\n- cd into the library\n- Use the [pip install -e . command]{.title-ref} to install the library along\n it\\'s dependencies\n- Copy the vtk_mrml wheel file matching your OS\n- Pip install the wheel using the find links command (see below)\n\n```console\npip install -e .\npip install vtk_mrml-9.4.0-cp310-cp310-win_amd64.whl --find-links . # Windows\npip install vtk_mrml-9.4.0-cp310-cp310-manylinux_2_35_x86_64.whl --find-links . # Linux WSL\n```\n\n## Getting started\n\nTo get started using trame, please have a look at the\n[introductory trame course](https://kitware.github.io/trame/guide/intro/course.html).\n\nTo start using the trame-slicer library, have a look and run the\n[medical viewer app](examples/medical_viewer_app.py)\n\n## Features\n\nThe following subset of 3D Slicer features are currently supported :\n\n- (limited) file loading\n- Volume files (DCM, NRRD, NIFTI, \\...)\n- Model files (STL, OBJ)\n- MRML / MRB files\n- Segmentations (NRRD, NIFTI, \\...)\n- **Display**\n - 2D/3D with 3D Slicer UI manipulation\n - Volume Rendering preset / shift\n- Bare bone access to 3D Slicer MRML scene and Core logic components\n\n## Work in progress\n\nTo make it easier for users to use trame-slicer, the following work are in\nprogress :\n\n- Slicer wheel generation merge into 3D Slicer\\'s preview release\n- CI changes to build the Slicer wheel along 3D Slicer\\'s release\n- 3D Slicer extension to install trame-slicer and launch a trame-slicer server\n directly from 3D Slicer\n\n## Troubleshooting\n\nIf you get the following error:\n\n`ImportError: cannot import name 'vtkMRMLDisplayableNode' from 'slicer' (XXX/lib/python3.10/site-packages/slicer/__init__.py)`\n\nYou might be using a statically compiled Python. Please switch to a shared\nversion of Python.\n\n## Contributing\n\nContributions are welcomed, please follow the\n[CONTRIBUTING.md](https://github.com/KitwareMedical/trame-slicer/blob/main/CONTRIBUTING.md)\nfile for more information.\n\n## License\n\nThe library is distributed with a permissive license. Please look at the\n[LICENSE](https://github.com/KitwareMedical/trame-slicer/blob/main/LICENSE) file\nfor more information.\n\n## Acknowledgment\n\nThis library was funded by the following projects :\n\n- [Cure Overgrowth Syndromes (COSY) RHU Project (ANR-18-RHUS-005)](https://rhu-cosy.com/en/accueil-english/).\n- [Handling heterogeneous Imaging and signal data for analysing the Neurodevelopmental Trajectories of premature newborns (HINT) ANR project (ANR-22-CE45-0034)](https://anr-hint.pages.in2p3.fr/)\n\nThis library was created from the\n[trame-cookicutter](https://github.com/Kitware/trame-cookiecutter/) library.\n\n## Contact\n\nIf you are interested in learning how you can use trame-slicer for your use case\nin the near future, or want to get an early start using the framework, don\\'t\nhesitate to [contact us](https://www.kitware.eu/contact/). Or reach out in the\n[issue tracker](https://github.com/KitwareMedical/trame-slicer/issues) and\n[3DSlicer discourse community](https://discourse.slicer.org/).\n",
"bugtrack_url": null,
"license": "Apache 2.0 License",
"summary": "trame-slicer library",
"version": "1.1.0",
"project_urls": null,
"split_keywords": [
"3dslicer",
" application",
" framework",
" interactive",
" medical",
" python",
" web"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1891412cd3360f08a614831e929566498f23d0492a9949a611915a0bbbe31e03",
"md5": "971bfa52ff07ce597379209557713933",
"sha256": "8c2bb155bbb6e07826c5079c209951bc47bd9ccf6523a5957a8c46df875d4b70"
},
"downloads": -1,
"filename": "trame_slicer-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "971bfa52ff07ce597379209557713933",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 885076,
"upload_time": "2025-08-07T07:17:36",
"upload_time_iso_8601": "2025-08-07T07:17:36.537825Z",
"url": "https://files.pythonhosted.org/packages/18/91/412cd3360f08a614831e929566498f23d0492a9949a611915a0bbbe31e03/trame_slicer-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "efbb5a4e2677a8e8db62c675082e359802529ad0cd614dac2c6a838af9cf3577",
"md5": "6e4ca14a8283738775fefb448f6a627e",
"sha256": "ec18dca9aeae55b1a2eb0436023518be4e3b6a5df9a0b924895b58714d3255eb"
},
"downloads": -1,
"filename": "trame_slicer-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "6e4ca14a8283738775fefb448f6a627e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1613357,
"upload_time": "2025-08-07T07:17:38",
"upload_time_iso_8601": "2025-08-07T07:17:38.356798Z",
"url": "https://files.pythonhosted.org/packages/ef/bb/5a4e2677a8e8db62c675082e359802529ad0cd614dac2c6a838af9cf3577/trame_slicer-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-07 07:17:38",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "trame-slicer"
}