Skip to content

This repository implements "A multichannel feature-based approach for longitudinal lung CT registration in the presence of radiation-induced lung damage" using the Pulmonary Toolkit and NiftyReg. It is based on research related to radiation-induced lung damage.

Notifications You must be signed in to change notification settings

chenyu-chang/NiftyReg_lung

Repository files navigation

Lung CT Registration

Implementation of lung CT registration based on the paper A multichannel feature-based approach for longitudinal lung CT registration in the presence of radiation induced lung damage. This codebase utilizes the Pulmonary Toolkit and NiftyReg for image processing and registration.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • MATLAB (version R2022a or higher recommended)
  • Pulmonary Toolkit installed
  • NiftyReg installed and available in your system's PATH

Installation

Clone the repository using Git:

git clone https://github.com/chenyu-chang/NiftyReg_lung.git

Data Structure

Organize your DICOM and mask data as follows:

data/
├─case1/
│  ├─20110224/
│  │  ├─dicom/
│  │  └─mask/
│  └─20110526/
│      ├─dicom/
│      └─mask/
└─case2/
    ├─20110525/
    │  ├─dicom/
    │  └─mask/
    └─20110926/
        ├─dicom/
        └─mask/

Flow Chart

graph LR

A[lung segmentation tool] -- "lungs.mat" --> B[main_feature.m]
A[lung segmentation tool] -- "lung_surface.mat" --> B[main_feature.m]
A[lung segmentation tool] -- "airways.mat" --> B[main_feature.m]
A[lung segmentation tool] -- "vessel.mat" --> B[main_feature.m]
B --> C[main_niftyreg.m]
Loading

Usage

Modify the path variables in the MATLAB script to point to your DICOM and mask directories. Once set up, run the script in MATLAB. The process is divided into the following stages:

  1. DICOM stacking
  2. Distance transforms for lungs and airways
  3. Binary masking for vessels
  4. Feature saving
  5. Image registration using NiftyReg tools
  6. Visualization of registration results

Registration Workflow

The script will:

  • Load and process DICOM images and masks for the reference (ref) and floating (flo) time points.
  • Perform image registration using features extracted from the DICOM images.
  • Save the registered images and transformation matrices.
  • Perform the registration to the floating images.
  • Display the registration results for validation.

Functions

Included custom MATLAB functions:

  • list_folder(path): Utility function to list folders.
  • masked_distance_transform(mask, surface): Applies a distance transform to the provided mask and surface.

Feature Demo

  1. masked lungs mask distance tranceform

masked lung mask distance tranceform

  1. masked airways mask distance tranceform

masked airways distance tranceform

  1. 4D feature

enter image description here

Reference

[1] A. Stavropoulou et al., “A multichannel feature-based approach for longitudinal lung CT registration in the presence of radiation induced lung damage,” Physics in Medicine & Biology, vol. 66, no. 17, p. 175020, 2021. doi:10.1088/1361-6560/ac1b1d

About

This repository implements "A multichannel feature-based approach for longitudinal lung CT registration in the presence of radiation-induced lung damage" using the Pulmonary Toolkit and NiftyReg. It is based on research related to radiation-induced lung damage.

Topics

Resources

Stars

Watchers

Forks

Languages