nipy / nipy/nitransforms

ENH: Upstream ResampleSeries resampling engine from fMRIPrep

Open
#294 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
35
Forks
18
Avg merge
21h 48m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading fmriprep/interfaces/resampling.py and fmriprep/utils/asynctools.py, focusing on ResampleSeries, resample_image, resample_vol, resample_series, and worker. Determine how these components should be shared in NiTransforms; done means the listed interface, functions, and utility are upstreamed for reuse by fMRIPrep, dMRIPrep, and NiBabies.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.