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 Carna.
See examples/kalinin2018.ipynb for an example.
- Only 8bit and 16bit volume data are supported at the moment.
- DRR renderings are not exposed to Python yet.
- Build process is currently limited to Linux-based systems.
Using the library requires the following dependencies:
- numpy ≥ 1.16
- EGL driver support
- OpenGL 3.3
- Python ≥ 3.7
The following dependencies must be satisfied for the build process:
- Carna ≥ 3.1
- Eigen ≥ 3.0.5
- libboost-iostreams
- pybind11
- EGL development files
In addition, the following dependencies are required to run the test suite:
The easiest way to install and use the library is to use one of the binary Conda packages:
conda install -c kostrykin carnapy
Conda packages are available for Python 3.7–3.9.
Assuming you are using a recent version of Ubuntu:
sudo apt-get -qq install libegl1-mesa-dev libboost-iostreams-dev
Create and activate a Conda environment to work in, then:
conda install -c conda-forge pybind11
Grab a recent version of Eigen, unpack it, and tell CMake where it is located:
wget https://gitlab.com/libeigen/eigen/-/archive/3.2.10/eigen-3.2.10.tar.gz
tar -vzxf eigen-3.2.10.tar.gz -C /tmp/
export CMAKE_PREFIX_PATH="/tmp/eigen-3.2.10:$CMAKE_PREFIX_PATH"
If you have not already, download, build, and install Carna:
git clone git@github.com:kostrykin/Carna.git build_carna
cd build_carna
sh linux_build.sh
Now it is time to build, package, and install CarnaPy:
cd ..
python setup.py build
python setup.py install