-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Follow-up: generate missing precomputed fmap masks via first-pass pathway
Summary
When --derivatives provides precomputed fieldmaps without an explicit mask, dMRIPrep has to handle fmap_mask='MISSING' before coeff2epi_wf registration.
Current behavior in dmriprep/workflows/dwi/fit.py avoids registration-time failure via fallback handling. This should be revised.
Why this needs follow-up
coeff2epi_wf expects a valid mask input and uses it during registration. The long-term fix should generate the missing fieldmap mask with the same pathway/logic used when masks are created during first-pass fieldmap processing, instead of relying on fallback behavior.
fMRIPrep comparison
As of fMRIPrep 25.2.4, the same pattern exists upstream:
- precomputed masks may be absent and represented as
'MISSING' fmap_maskis still passed tocoeff2epi_wf
So this is not yet resolved upstream either, but dMRIPrep should track and improve this locally.
Proposed follow-up
- Identify and reuse the exact mask-generation path used in first-pass fieldmap preprocessing.
- Replace fallback behavior for precomputed fieldmaps lacking mask derivatives with that generation path.
- Add integration tests for
--derivativesreuse with missing mask and with complete precomputed fieldmaps. - Re-check parity and possible upstream alignment with fMRIPrep/SDCFlows.
Scope
This issue tracks technical debt/improvement only. Current behavior is a defensive stopgap to avoid registration-time failure.