Skip to main content

A collection of utilities related to processing 3D volumetric data and the CDMA group of Rostock University.

Project description

CDMA Utilities

A collection of utilities related to processing 3D volumetric data and the CDMA group of Rostock University.

Installation

This project uses pre-commit, please make sure to install it before making any changes:

pip install pre-commit
cd cdma-utils
pre-commit install

It is a good idea to update the hooks to the latest version::

pre-commit autoupdate

Don't forget to tell your contributors to also install and use pre-commit.

Styling

CDMA Color Maps

cdma_cmaps can be used to create sequential or diverging color maps based on the colors of the CDMA logo. These palettes can either be continuous (as_cmap=True) or discrete (as_cmap=False). The color maps can be reversed by setting the reverse argument to True. The color maps can be used in matplotlib by passing them to the cmap argument.

Sequential

The sequential color maps are either orange or blue. They either fade to white or black, depending on the kind argument. The color maps can also be reversed. Some examples are shown below:

blue to white

Diverging

The diverging color maps can either start at orange or blue and end at the opposite color. The starting and end color are not the CDMA colors. The diverging color maps can also be reversed. Some examples are shown below:

Napari Themes

These are two CDMA-themed napari themes. One is more for demonstration purposes, the other can also be used in a normal setting.

Display

IPyViewer

You know the problem: You just started a remote programming session, logged into the remote interpreter via SSH and your favorite IDE and then you encounter a bug related to 3D volumetric data. (Okay, maybe a little specific, but at least I have encountered this problem before.)

Now, normally, you would have to start a remote desktop session (just try that on the train!), open Napari, Fiji, or Slicer, and inspect the actual image data. Pretty bothersome.

But fear not! The IPyViewer can show your 3D data directly in the Jupyter notebook. It is basically a very specced down version of one of the above programs, but works with a napari-esque API:

from cdma.display import IPyViewer
from cdma.mock_data import create_fake_stack

image_stack = create_fake_stack()

viewer = IPyViewer()
viewer.add_image(stack)
# viewer.add_mask(some_mask) # optionally add a mask that is blended over the image
viewer.show()

You will be able to scroll through 2D slices along a given axis. Also, the current slice intersection is shown:

Project details


Download files

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

Source Distribution

cdma-0.0.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdma-0.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file cdma-0.0.1.tar.gz.

File metadata

  • Download URL: cdma-0.0.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cdma-0.0.1.tar.gz
Algorithm Hash digest
SHA256 031da0e5e1a73d3ab22c1fd0e3ea6f6af99921225530bd83cefe1ca9b266bbae
MD5 698df7f191d5a6409af115a059332440
BLAKE2b-256 e4a0b03b282c3352e6e1da28b614e39744dde953a80424c6bc03a08c383524b8

See more details on using hashes here.

File details

Details for the file cdma-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cdma-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cdma-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47cd5363bb11366718ee01b18bc860f36fe4533e3c69b5764185711baed0307d
MD5 0b12d83924ba511df98acab06162aed9
BLAKE2b-256 88532f817014a0c8cf21260e1dc613422284ccf7110a82c4a31b9f3735f24f27

See more details on using hashes here.

Supported by

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