Skip to content

A tool for loading, processing, and visualizing medical DICOM data.

License

Notifications You must be signed in to change notification settings

shujuecn/Radiverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Installation

pip install radiverse -i https://pypi.org/simple

Usage Example

from radiverse.windowing 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.

About

A tool for loading, processing, and visualizing medical DICOM data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages