Skip to content

Follow-up: generate missing precomputed fmap masks via first-pass pathway #246

@oesteban

Description

@oesteban

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_mask is still passed to coeff2epi_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 --derivatives reuse 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions