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.
| 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 |
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.
- Python 3.9 or higher
- Linux / macOS (Windows via WSL also works)
The main dependencies are:
nibabelpydicomnumpymatplotlibscipy
Install them using:
pip install nibabel pydicom numpy matplotlib scipy