Skip to content

This project demonstrates a basic workflow for processing DICOM (Digital Imaging and Communications in Medicine) medical images using the pydicom Python library.

Notifications You must be signed in to change notification settings

Helenaden/Image-Processing-Image-IO-and-Transformation

Repository files navigation

Image-Processing-Image-IO-and-Transformation

Project Overview

This project demonstrates a basic workflow for processing DICOM (Digital Imaging and Communications in Medicine) medical images using the pydicom Python library.

The workflow covers essential steps such as loading and exploring DICOM metadata, accessing pixel data, handling RTSTRUCT files, and even writing new DICOM files. It serves as a foundation for anyone working with medical imaging and machine learning pipelines.

The project walks through the following:

Key Steps

  1. Environment Setup

    • Clone a repository containing sample DICOM files.
    • Install the required Python library (pydicom).
  2. Understanding DICOM Structure

    • Explore key components: Datasets, DataElements, Tags, and Sequences.
  3. Accessing Metadata

    • Extract essential information from DICOM headers using tags.
  4. Working with Pixel Data

    • Access and visualize the image data stored in DICOM files.
    • Learn why pixel values often need to be rescaled to Hounsfield Units (HU) for CT images.
  5. Handling Volume Data

    • Implement a CT_volume class to organize and access a series of CT slices as a 3D volume.
  6. Visualizing Volume Data

    • Use Plotly to visualize CT data in 3D.
  7. Writing DICOM Files

    • Learn how to create and save new DICOM files.
    • Handle mandatory attributes when writing.
  8. Working with RTSTRUCT Files

    • Explore RTSTRUCT (Radiotherapy Structure Set) files containing contour data for Regions of Interest (ROIs).
  9. Extracting & Visualizing Contours

    • Extract ROI contour data from RTSTRUCT files.
    • Visualize contours using Matplotlib.

Prerequisites

To run this project, you’ll need:

  • Google Colab (recommended) or a local Python environment with Jupyter Notebook installed.
  • Python libraries:
pip install pydicom numpy matplotlib scipy plotly

About

This project demonstrates a basic workflow for processing DICOM (Digital Imaging and Communications in Medicine) medical images using the pydicom Python library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published