How amiruthavallii/fetal-diffusion-mri works
Project Type and Purpose
• This is an analysis pipeline (not a full‐stack web app) composed of BASH wrappers and Python/Jupyter modules.
• Purpose: Preprocess fetal T2/DWI images, extract ROI features, compute summary statistics, and run regression/z‐score analyses.
File Structure and Workflow
• batch_transform_all.sh: Aligns DWI → T2 (pre‐processing step 1)
• batch_mask.sh: Strips non‐brain areas from T2 (pre‐processing step 2)
• Jupyter notebooks (Extract_regions, Calculate_average_values, Polynomial_ridge_regression(.ipynb), VM_zscore(.ipynb)): Python processing modules
• Supporting notebooks (e.g., Polynomial_regression.ipynb) for exploratory or modified workflows
• No external server or database—inputs and outputs are file‐based
Architecture Components
a. Data Inputs
• Raw T2‐weighted (T2w) and Diffusion‐Weighted (DWI) MRI scans (file storage or DICOM/NIfTI folder)
b. Preprocessing Modules
• batch_transform_all.sh (BASH)
• batch_mask.sh (BASH)
c. Feature Extraction Module
• Extract_regions.ipynb (Python + NiBabel/numpy)
d. Statistical & Modeling Modules
• Calculate_average_values.ipynb (pandas, openpyxl)
• Polynomial_ridge_regression.ipynb (scikit-learn)
• VM_zscore.ipynb (scipy/numpy)
e. Outputs
• Aligned/masked image files (NIfTI)
• Excel spreadsheets of mean intensities
• Regression model results (plots, metrics)
• Z‐score reports
Relationships and Data Flow
• Raw Data → (batch_transform_all.sh) → Aligned DWI→ (batch_mask.sh) → Masked T2/DWI
• Masked images → (Extract_regions.ipynb) → ROI feature files (CSV/NumPy arrays)
• ROI features → (Calculate_average_values.ipynb) → Summary statistics (Excel)
• Summary stats → (Polynomial_ridge_regression.ipynb) → Model outputs
• Subject group stats → (VM_zscore.ipynb) → Z‐score tables/plots
Important Patterns and Technologies
• Modular pipeline with sequential stages
• BASH orchestration calling Python notebooks/scripts
• File‐based I/O rather than networked services
• Use of standard scientific Python stack (NiBabel, NumPy, pandas, scikit-learn)
Detail
• File formats at each handoff (e.g., NIfTI → CSV → XLSX)
• Parallel/iterative loops if any (e.g., batching over subject directories)
• External dependencies (e.g., shell environment, Python version)