feat(ingest): add NIfTI loader for fd5#123
Merged
gerchowl merged 1 commit intovig-os:devfrom Feb 28, 2026
Merged
Conversation
- Add fd5.ingest._base with Loader protocol, hash_source_files, discover_loaders - Add NiftiLoader reading NIfTI-1/NIfTI-2 via nibabel into sealed fd5 recon files - Provenance records source file path and sha256-prefixed hash - Add _typos.toml to allow OME and tre identifiers - Align provenance test assertions with sha256-prefixed hashes - 28 tests covering protocol conformance, ingest, provenance, idempotency Refs: vig-os#111
8d6558b to
89ba415
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fd5.ingestsub-package withLoaderprotocol,hash_source_files()helper, andNiftiLoaderimplementationNiftiLoaderreads NIfTI-1/NIfTI-2 files (.nii,.nii.gz) via nibabel, extracts volume data, affine (sform/qform), and dimension order, then produces sealed fd5reconfiles viafd5.create()study_metadatawrites study groupniftioptional dependency group (nibabel>=5.0) topyproject.tomlTest plan
Loaderprotocol conformance — valid loader is instance, invalid is nothash_source_files()— single file, multiple files, empty list, missing fileTZYXdimension order.nii.gzcompressed files handled transparentlyNiftiLoader.ingest()method delegates correctlyImportErrorwith clear message when nibabel not installedCloses #111