NIfTI dataset toolkit for CT/MRI deep-learning pipelines: slice extraction, registration, QC, preprocessing β no ML dependencies.
Official GitHub repository available here.
π Quick start
pip install nidataset # add [yaml] for YAML pipeline / QC configs
import nidataset as nid
print(nid.qc.check_dataset("scans/").status) # orientation, spacing, NaN, ... before anything else
nid.resampling_dataset("scans/", "resampled/", desired_volume=(224, 224, 128), saving_mode="folder")
nid.extract_slices_dataset("resampled/", "slices/", view="axial", saving_mode="view")
nid.extract_annotations_dataset("labels/", "annotations/", view="axial", saving_mode="view")
Or describe the whole chain in one config and run it from the shell β see Pipelines:
nii run pipeline.yaml # QC -> slices -> registration -> ... + run_manifest.json
π§ Where to go next
| I want to⦠| Go to |
|---|---|
| Install, extras, FSL, templates | Installation |
| Run a reproducible multi-step pipeline | Pipelines (nii run) |
| Check a dataset before training | Quality Control |
| Rotate / flip / crop / convert from the shell | Quick Operations (nii) |
| Look up a function | Package Functions |
| See what changed | Changelog |
| Cite nidataset | CITATION.cff |

Check here for a complete NIfTI guide
π¨βπ» Authors
βοΈ License
MIT License
NIfTI Dataset Management