Skip to main content

DICOM colormaps for matplotlib.

Project description

dcm-colmap

Matplotlib implementation of the DICOM colormaps defined in NEMA DICOM PS3.6, Annex B

Available colormaps

fall, hotiron, hotmetalblue, pet, pet20step, spring, summer, winter

Install

pip install dcm-colmap

Usage

Get a Colormap instance directly:

import matplotlib.pyplot as plt
import numpy as np
from dcmcolmap import get_colormap

gradient = np.linspace(0, 1, 256).reshape(1, -1)
plt.imshow(gradient, aspect="auto", cmap=get_colormap("pet"))
plt.show()

Or register every colormap with matplotlib under a dicom_ prefix so you can reference them by string name in matplotlib plots:

import matplotlib.pyplot as plt
import numpy as np
from dcmcolmap import register_all

register_all()

gradient = np.linspace(0, 1, 256).reshape(1, -1)
plt.imshow(gradient, aspect="auto", cmap="dicom_hotiron")
plt.show()

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

dcm_colmap-0.0.1.tar.gz (78.0 kB view details)

Uploaded Source

Built Distribution

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

dcm_colmap-0.0.1-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dcm_colmap-0.0.1.tar.gz
  • Upload date:
  • Size: 78.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dcm_colmap-0.0.1.tar.gz
Algorithm Hash digest
SHA256 10d6dccd0b64a350c6d7b8975f36bc6f090995feb592280861e1aa80087f98db
MD5 0cbab77b9510435fcda5a4dd9bcd12e7
BLAKE2b-256 7b6d79f22da1b73c6d523293cc449c149eda0a7b31c15ceb57f5353f6154e3cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dcm_colmap-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dcm_colmap-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1aa266bc25b69975087123553f5162ca5f6ab788c97cb5a09285059c79a7f46
MD5 5cf1a6e7f0e2e07d50de5f86512f2794
BLAKE2b-256 37b94728a11b69ea1710ed0bc225c47ee723c193a4c0d310e5adb785626cc5e2

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