A toolkit to provide GPU accelerated visualization of medical data.
Project description
Quick Start
Installation
This will install all Clara Viz packages use pip:
$ pip install clara-viz
Clara Viz is using namespace packages. The main functionality is implemented in the 'clara-viz-core' package, Jupyter Notebook widgets are found in the 'clara-viz-widgets' package. So for example if you just need the renderer use
$ pip install clara-viz-core
Use interactive widget in Jupyter Notebook
Install the Jupyter notebook widgets.
$ pip install clara-viz-widgets
Start Jupyter Lab, open the notebooks in the notebooks
folder. Make sure Git LFS is installed when cloning the repo, else the data files are not downloaded correctly and you will see file open errors when using the example notebooks.
from clara.viz.widgets import Widget
from clara.viz.core import Renderer
import numpy as np
# load a RAW CT data file (volume is 512x256x256 voxels)
input = np.fromfile("CT.raw", dtype=np.int16)
input = input.reshape((512, 256, 256))
display(Widget(Renderer(input)))
Render CT data from Python
from PIL import Image
import clara.viz.core
import numpy as np
# load a RAW CT data file (volume is 512x256x256 voxels)
input = np.fromfile("CT.raw", dtype=np.int16)
input = input.reshape((512, 256, 256))
# create the renderer
renderer = clara.viz.core.Renderer(input)
# render to a raw numpy array
output = renderer.render_image(1024, 768, image_type=clara.viz.core.ColorImageType.RAW_RGBA_U8)
rgb_data = np.asarray(output)[:, :, :3]
# show with PIL
image = Image.fromarray(rgb_data)
image.show()
clara-viz 0.4.0 (April 10 2024)
Features
- Add Python and pybind11 source code
- Add support for Python 3.10 and 3.11 packages and set Python wheel requirement to fail installation on unsupported Python versions
Bug Fixes
- Add missing include to DataSourceUS.cpp (32) @thewtex
- Upgrade almalinux-release in Docker build for GPG keys (31) @thewtex
- Gracefully disable OptiX and NvENC features if initialization fails.
- Python: Fix segfault when accessing RGBA data of rendered image (33) @thewtex
clara-viz 0.3.2 (November 27 2023)
Features
- Support camera pose for non-stereo cases as well
Bug Fixes
- Fix cmake warnings and consolidate cmake_minimum_required() usage
- Fix compile warning in NvEnvService.cpp
clara-viz 0.3.1 (July 12 2023)
Bug Fixes
- Gracefully disable OptiX denoiser if it can't be created
- make nvjpeg support optional
clara-viz 0.3.0 (June 22 2023)
Features
- C++ interface is now public
- Add support for aarch64 (not for Python wheels)
- Add support for VR/AR rendering
- Camera has stereo mode and left end right eye poses, tangents and gaze directions
- Add warped and foveated rendering
- Add reprojection
- Add support for separate depth buffer
- Add support for alpha channel
- Add support for near and far depth plane
- Add support for transforming the volume using a matrix
Bug Fixes
- Fix tonemap enable, had no effect before (always enabled).
- AttributeError: module 'itk' has no attribute 'itkSpatialOrientationPython' (https://github.com/NVIDIA/clara-viz/issues/26)
Security
- Update Jupyter widget Java code packages to fix vulnerability CVE-2022-46175
clara-viz 0.2.2 (October 17 2022)
Bug Fixes
- Jupyter notebooks fail with AttributeError: 'Widget' object has no attribute 'on_displayed' (https://github.com/NVIDIA/clara-viz/issues/23)
Security
- Update Jupyter widget Java code packages to fix vulnerabilities
Documentation
- pip install fails on Windows machines (https://github.com/NVIDIA/clara-viz/issues/22)
- Windows is not supported, added a section on supported OS to readme
clara-viz 0.2.1 (March 29 2022)
Bug Fixes
- Widget can't be displayed because of version mismatch
clara-viz 0.2.0 (March 29 2022)
Features
- Add support for rendering multi resolution images used in digital pathology
Security
- Update Jupyter widget Java code packages to fix vulnerabilities
Bug Fixes
- Error when using a widget with a renderer using a numpy array (https://github.com/NVIDIA/clara-viz/issues/18)
Documentation
- Fix typo for
image_type
parameter in the sample code of the readme file - Extended documentation, added multi resolution image rendering
clara-viz 0.1.4 (Feb 15 2022)
Security
- Update Jupyter widget Java code packages to fix vulnerabilities
Bug Fixes
- Regression - cinematic rendering example throws an error (https://github.com/NVIDIA/clara-viz/issues/16)
clara-viz 0.1.3 (Jan 31 2022)
New
- Support installation of recommended dependencies
Bug Fixes
- Failed to load data files with ITK when using Clara Train docker image (https://github.com/NVIDIA/clara-viz/issues/12)
- Rendering is wrong when passing non-contiguous data in (e.g. transposed numpy array)
- Widget interaction in slice mode not working correctly (https://github.com/NVIDIA/clara-viz/issues/13)
clara-viz 0.1.2 (Jan 19 2022)
Bug Fixes
- When the renderer is immediately destroyed after creation there is a segmentation fault. This could happen when providing a unsupported data type (e.g. 64 bit floating point values), when creating a temporary object (e.g. in Python
print(Renderer(data)))
) or when the initialization of the Renderer failed. (https://github.com/NVIDIA/clara-viz/issues/7, https://github.com/NVIDIA/clara-viz/issues/8) - Widget is not working with Jupyter Notebooks (but with Jupyter Lab) (https://github.com/NVIDIA/clara-viz/issues/9)
Documentation
- Added missing
video
capability to docker run command
clara-viz 0.1.1 (Dec 14 2021)
Bug Fixes
- When installing the
clara-viz-core
Python package only there is the errorModuleNotFoundError: No module named 'packaging'
when doingimport clara.viz.core
- When getting the settings from the renderer the 'TransferFunctions' sections is returned as 'Transferfunctions' with lower case 'f'
Documentation
- Added a section on using Clara Viz within a docker container.
- Added a link to the documentation.
- Added a section on WSL (Windows Subsystem for Linux).
Notebooks
- The DataDefinition class is using ITK to load the data files, make sure ITK is available.
- Added a slice rendering example (Slice_rendering.ipynb)
- Fixed the check if the volume file exists in Render_image.ipynb, also fixed volume orientation and scaling.
- Updated the settings files to match the settings conventions used by the renderer.
Misc
- Changed the camera names and removed the
Slice
prefix of the orthographic cameras. Renamed the perspective camera fromCinematic
toPerspective
clara-viz 0.1.0 (Dec 3 2021)
Initial release of Clara Viz
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 Distributions
Built Distribution
Hashes for clara_viz_widgets-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83c1e8eb336f4a7a61f6f8be8bca396c75c0afed44ba54f0d2757635347d4896 |
|
MD5 | 0b81afb05a9c8121be9afed78955ccfc |
|
BLAKE2b-256 | 9d5a656008e373e7cc435a08c286b3dbdbb7d14c443cb54ce27a3c3c4e1b0b65 |