Skip to main content

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


Download files

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

Source Distribution

ct_image_to_pic_list-0.0.5.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

ct_image_to_pic_list-0.0.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

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

Hashes for ct_image_to_pic_list-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b11f0969cec56237517a9c865e03441fb4a13f1a53b8f15f6893bae6295462e1
MD5 ab4bea53e46d983b07a8ebead867c74e
BLAKE2b-256 28fac915509b3ec6a6a1e403fb749930fa2a2a5397fa285f4840c8b1974033e3

See more details on using hashes here.

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

Hashes for ct_image_to_pic_list-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6f47ad7ecafc994b2a3ee2d07ec564398221f1a42e1e965e1a4622d73ab358aa
MD5 001bbca6bbd9c32d1e09b54035ef77d5
BLAKE2b-256 d7dcb9feecd2062d03223fdb4010bb919657baf898d71b4c1e4a20aff3a623cf

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