https://github.com/kostrykin/libcarna-python
Real-time 3D visualization for biomedical data and beyond in Python
https://github.com/kostrykin/libcarna-python
3d 3d-visualization data-visualization digitally-reconstructed-radiograph direct-volume-rendering jupyter maximum-intensity-projections opengl python scientific-visualization
Last synced: 3 months ago
JSON representation
Real-time 3D visualization for biomedical data and beyond in Python
- Host: GitHub
- URL: https://github.com/kostrykin/libcarna-python
- Owner: kostrykin
- License: mit
- Created: 2021-06-08T18:00:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-05-17T10:22:59.000Z (5 months ago)
- Last Synced: 2025-06-07T08:43:12.937Z (4 months ago)
- Topics: 3d, 3d-visualization, data-visualization, digitally-reconstructed-radiograph, direct-volume-rendering, jupyter, maximum-intensity-projections, opengl, python, scientific-visualization
- Language: C++
- Homepage: https://libcarna.readthedocs.io
- Size: 19.4 MB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LibCarna-Python
===============The aim of this package is to provide real-time 3D visualization in Python for specifically, but not limited to, biomedical data. The library is based on [LibCarna](https://github.com/kostrykin/LibCarna).
See [libcarna.readthedocs.io](https://libcarna.readthedocs.io) for examples and documentation.
[](https://github.com/kostrykin/LibCarna-Python/actions/workflows/build_all.yml)
[](https://anaconda.org/bioconda/libcarna-python)
[](https://anaconda.org/bioconda/libcarna-python)
[](https://anaconda.org/bioconda/libcarna-python)---
---
## Contents* [Limitations](#1-limitations)
* [Dependencies](#2-dependencies)
* [Installation](#3-installation)
* [Build instructions](#4-build-instructions)
---
## 1. Limitations* Only 8bit and 16bit volume data are supported at the moment.
* Only a subset of rendering stages is exposed to Python yet.
* Build process is currently limited to Linux-based systems.---
## 2. DependenciesGeneral dependencies are listed in *environment.yml*. Further dependencies for testing are listed in
*test/requirements.txt*, and those for the documentation in *docs/requirements.txt*.---
## 3. InstallationThe easiest way to install and use the library is to use one of the binary [Conda](https://www.anaconda.com/docs/getting-started/miniconda) packages:
```bash
conda install bioconda::libcarna-python
```If you encounter an error that looks like below,
> Failed expression: pimpl->eglDpy != EGL_NO_DISPLAY
then you must install the EGL implementation suitable for your rendering hardware (e.g., `sudo apt install libegl1`
installs a meta package that automatically chooses the right implementation, or `libegl-mesa0` for software rendering).---
## 4. Build instructionsThere is a build script for Ubuntu Linux which builds a wheel file:
```bash
LIBCARNA_PYTHON_BUILD_DOCS=1 LIBCARNA_PYTHON_BUILD_TESTS=1 ./linux_build.bash
```
Adaption to other distributions should be self-explanatory.After building the wheel file, it can be installed using:
```bash
pip install --force-reinstall build/dist/libcarna_python-*.whl
```To build against a development version of [LibCarna](https://github.com/kostrykin/LibCarna), install it locally via
```bash
LIBCARNA_SRC_PREFIX="../LibCarna" ./install_libcarna_dev.bash
```
where you make `LIBCARNA_SRC_PREFIX` point to the source directory.This will create a local directory `.libcarna-dev`. The build process will give precedence to LibCarna from this directory over other versions. Simply remove `.libcarna-dev` to stop building agaisnt the development version of LibCarna.