Skip to main content

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

Security

  • Update Jupyter widget Java code packages to fix vulnerability CVE-2022-46175

clara-viz 0.2.2 (October 17 2022)

Bug Fixes

Security

  • Update Jupyter widget Java code packages to fix vulnerabilities

Documentation

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

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

clara-viz 0.1.3 (Jan 31 2022)

New

  • Support installation of recommended dependencies

Bug Fixes

clara-viz 0.1.2 (Jan 19 2022)

Bug Fixes

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 error ModuleNotFoundError: No module named 'packaging' when doing import 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 from Cinematic to Perspective

clara-viz 0.1.0 (Dec 3 2021)

Initial release of Clara Viz

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

clara_viz_widgets-0.4.0-py2.py3-none-any.whl (390.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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