convert a 3d CT/MRI image (numpy) into pillow image list.
Project description
ct_image_to_pic_list
convert a 3d CT/MRI image (numpy) into pillow image list.
Installation
pip install ct_image_to_pic_list
Usage
reading 3d CT image.
import numpy as np
from ct_image_to_pic_list import convert_ct_3darray_to_grey_image_list
# construct you 3d CT image (HU value)
arr3d = np.array([ ... ])
# get a list of PIL.Image.Image
img_list = convert_ct_3darray_to_grey_image_list(arr3d)
# save it if you want
for index, img in enumerate(img_list):
img.save(f"{index:05d}.png")
reading 3d MRI image.
import numpy as np
from ct_image_to_pic_list import convert_mri_3darray_to_grey_image_list
# construct you 3d MRI image (HU value)
arr3d = np.array([ ... ])
# get a list of PIL.Image.Image
img_list = convert_mri_3darray_to_grey_image_list(arr3d)
# save it if you want
for index, img in enumerate(img_list):
img.save(f"{index:05d}.png")
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 ct_image_to_pic_list-0.0.5.tar.gz.
File metadata
- Download URL: ct_image_to_pic_list-0.0.5.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.16.10-aosc-main
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b11f0969cec56237517a9c865e03441fb4a13f1a53b8f15f6893bae6295462e1
|
|
| MD5 |
ab4bea53e46d983b07a8ebead867c74e
|
|
| BLAKE2b-256 |
28fac915509b3ec6a6a1e403fb749930fa2a2a5397fa285f4840c8b1974033e3
|
File details
Details for the file ct_image_to_pic_list-0.0.5-py3-none-any.whl.
File metadata
- Download URL: ct_image_to_pic_list-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.10.18 Linux/6.16.10-aosc-main
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f47ad7ecafc994b2a3ee2d07ec564398221f1a42e1e965e1a4622d73ab358aa
|
|
| MD5 |
001bbca6bbd9c32d1e09b54035ef77d5
|
|
| BLAKE2b-256 |
d7dcb9feecd2062d03223fdb4010bb919657baf898d71b4c1e4a20aff3a623cf
|