(Preprocessing.ipynb) for preprocessing heart MRI datasets for heart segmentation tasks. The workflow is built around the Medical Segmentation Decathlon (MSD) - Task02_Heart dataset.
- Data Extraction: Extracts MRI image and label data from a
.tararchive. - Path Management:
pathlibto organize and access image (imagesTr) and label (labelsTr) directories. - Data Loading: Loads NIfTI (
.nii.gz) files usingnibabelfor 3D medical imaging. - Visualization: Visualizes MRI slices and segmentation masks with
matplotlib. - Preprocessing: Includes helper functions to:
- Map image files to corresponding label files
- Normalize and prepare data arrays
- Optionally resize or crop image volumes for model input
- Source: Medical Segmentation Decathlon (MSD) - Heart dataset
- Type: 3D Semantic Segmentation
- Format: NIfTI
Task02_Heart/
├── imagesTr/
│ ├── la_001.nii.gz
│ ├── la_002.nii.gz
│ └── ...
└── labelsTr/
├── la_001.nii.gz
├── la_002.nii.gz
└── ...
