Skip to content

ENH: Upstream ResampleSeries resampling engine from fMRIPrep #294

@oesteban

Description

@oesteban

Summary

fMRIPrep contains the core one-shot resampling engine for EPI time series in fmriprep/interfaces/resampling.py. This is the most architecturally significant piece of fMRIPrep code that should be shared across NiPreps.

ResampleSeries interface + resample_image / resample_vol / resample_series functions

The core one-shot resampling engine that combines:

  • Per-volume HMC transform application (VOX2VOX)
  • Fieldmap-based coordinate displacement with PE direction
  • Jacobian intensity correction
  • Async concurrent per-volume resampling

The modality-agnostic core (resample_vol, async infrastructure) can serve as the shared resampling engine for fMRIPrep, dMRIPrep, and NiBabies.

Supporting utility: asynctools.worker (fmriprep/utils/asynctools.py)

Async semaphore-gated worker function for concurrent resampling.

Code to upstream

  • ResampleSeries Nipype interface
  • resample_image, resample_vol, resample_series functions
  • asynctools.worker utility

Rationale

  • dMRIPrep needs essentially identical one-shot resampling (with DWI-specific adaptations)
  • The core resample_vol function is modality-agnostic
  • NiTransforms is the natural home for the reference resampling implementation
  • This would become the shared resampling engine for the entire NiPreps ecosystem

Priority

HIGH — cornerstone of the transform stage, critical for dMRIPrep.

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