Skip to content

seyedrezaseif/RESPECT_Data_Prep

Repository files navigation

RESPECT_Data_Prep

Python License

🚀 Overview

RESPECT_Data_Prep is a Python-based toolkit for preparing MRI data for the RESPECT image registration pipeline.
It provides a set of scripts for:

  • Converting MRI NIfTI files into slice-wise MR DICOM with consistent geometry
  • Batch coregistration of multi-modal MRI series
  • Visual inspection through image and segmentation overlays
  • Generating basic segmentation quality metrics
  • Cleaning and harmonizing dataset directory structures

The goal of this repository is to standardize MRI preprocessing, reduce manual errors, and provide reproducible preparation steps before downstream registration and analysis.


📁 Repository Structure

File Description
Inspect_T1_T2_nii2Dicom.py Converts T1/T2 NIfTI volumes into slice-wise MR DICOM with realistic metadata
batch_coregister_full_terminal_log.py Runs batch coregistration and logs full terminal output
batch_coregister_inplace.py Performs coregistration directly in existing folders
batch_coregister_print_only.py Prints coregistration commands without executing them
overlay.py Visual overlay of two MRI images
overlay_Seg_metrics.py Overlay of anatomical images and segmentations + metrics
remove_leading_dot.py Utility to fix file names starting with a dot
.gitignore Git ignore rules for Python projects

🧠 Motivation

MRI preprocessing for registration pipelines often involves repetitive and error-prone manual steps.
This repository centralizes common preparation tasks such as:

  • Format harmonization (NIfTI → DICOM)
  • Batch execution of coregistration
  • Visual quality control
  • Dataset cleanup

This allows faster experimentation and more reproducible results across datasets.


📦 Requirements

System Requirements

  • Python 3.9 or higher
  • Linux / macOS (Windows via WSL also works)

Python Dependencies

The main dependencies are:

  • nibabel
  • pydicom
  • numpy
  • matplotlib
  • scipy

Install them using:

pip install nibabel pydicom numpy matplotlib scipy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages