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
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dcm_colmap-0.0.2.tar.gz.
File metadata
- Download URL: dcm_colmap-0.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d4c52fbe37e56f396cdcebe73ea5d6aa9c3887ee3a819d1986207ecabd067d0
|
|
| MD5 |
8df78cb35df5534d73013ef1381da0c7
|
|
| BLAKE2b-256 |
34d2bfcd021102d65f92386138ddb8d0999b509964240ec346abde9bc55f095c
|
File details
Details for the file dcm_colmap-0.0.2-py3-none-any.whl.
File metadata
- Download URL: dcm_colmap-0.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c192ffa19ed73594c9f44339c02e87fcf4ec6a750cb474e6b1c6cec01c1e2147
|
|
| MD5 |
d5bec7fb77439a8912a5dc8375531106
|
|
| BLAKE2b-256 |
c713809d225cbf4ba103ea4fd4ec9e7855fe9adbdc87f5df2a57b1cf9212ced6
|