Skip to main content

A Python package for DICOM image processing.

Project description

Radiverse

Radiverse is a Python tool for loading, processing, and visualizing medical DICOM (Digital Imaging and Communications in Medicine) image data with windowing, conversion to Hounsfield units, and saving capabilities.

Usage Example

from radiverse.utils import Dicom

Load DICOM files

# Single image
dcm = Dicom("ct_files/00000001.dcm")

# Folder
dcm = Dicom("ct_files")

output:

PatientName: Anonymous
PatientID: 20240527-224912
PatientSex: M
StudyID: 1706
Rows: 512
Columns: 512
SliceThickness: 1.250000
PixelSpacing: [0.703125, 0.703125]
WindowCenter: 60
WindowWidth: 350
RescaleIntercept: -1024
RescaleSlope: 1

Apply windowing

Common (window width, window center) examples:

  • Lung: (1500, -400)
  • Head: (80, 40)
  • Mediastinum: (400, 60)
  • Bone: (1500, 300)
dcm.set_window(400, 60)

Display

  • Original image
dcm.show(9, cmap="o")

  • HU image
dcm.show(9, cmap="h")

  • Both original and HU images
dcm.show(9, cmap="oh")

Save HU images

  • Save single HU image
dcm.save_hu_image(index=0, save_path="output")
  • Save all HU images
dcm.save_all_hu_images(save_path="output")

Acknowledgments

Special thanks to 3097530495yi for providing reference.

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

radiverse-0.1.0.tar.gz (41.9 kB view details)

Uploaded Source

Built Distribution

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

radiverse-0.1.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file radiverse-0.1.0.tar.gz.

File metadata

  • Download URL: radiverse-0.1.0.tar.gz
  • Upload date:
  • Size: 41.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for radiverse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a05488a82b765b1bbe93272253ea7d640f862e05d74384946048f9e0d6153da9
MD5 1d65b7dd59f7eb3908c44f2a3bd82ec8
BLAKE2b-256 36b7b286ae370c67e88a792e80e29148c2da715971a3a8e4534cca97edc2addc

See more details on using hashes here.

File details

Details for the file radiverse-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: radiverse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for radiverse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bad77efe9f6e16e73e024f6012e5a778433882c0deebe51812338d6e66112aa
MD5 5b94fbaa56662441419e2946abb72521
BLAKE2b-256 af5a7e03172b225157bebc80137ea69f5d198820302a086d49800f7b2b7908d7

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