Repository navigation
sdc: SyN-SDC pipeline package (packages/sdc) for the browser and Node #464
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
Chain preprocessing, restricted SyN registration and the field-map fit in one package that the app and the command line both import.
- Q51 (fixed): the outputs keep the b0 volumes.
- Q52 (fixed): the default mask is MindGrab (model
mindgrab) of the mean b0. The user can upload a mask instead.
Size: L (one large PR, or split it in the PR plan).
Decisions (20 October 2026): this issue follows the sdc plan (PR #499, section 9).
Scope
packages/sdc: EPI reference from the b0 volumes, MindGrab masks (or an uploaded mask), anat clip andDenoiseImage, epi2anat affine, Laplacians, the prior warp through the T1w-to-MNI affine of Q59 (with a "no prior" option), restricted SyN, field-map fit (sdc: Rust crate for displacement-to-field-map conversion and B-spline approximation #463), one resampling of the DWI series.- Read the PE direction and
TotalReadoutTimefrom the sidecar or the sidebar. Else computeTotalReadoutTimefromEffectiveEchoSpacing, asget_trtdoes. Do not useEstimatedTotalReadoutTimeor sdcflows' fallback. Refuse without both (Q62). Never guess the polarity. - Add the
sdc/prior/files tomodels/sdc.manifest.json(Q60). - Outputs (plan section 5):
*_desc-sdc_dwi.nii.gz(b0 volumes kept, Jacobian factor), bval and bvec passed through,*_desc-preproc_fieldmap.nii.gzin Hz,*_desc-coeff_fieldmap.nii.gz,*_from-orig_to-sdc_mode-image_xfm.nii.gz,*_desc-brain_mask.nii.gz, JSON sidecars. - Inject runtimes (browser workers or Node drivers), as
packages/brain2printdoes.
Acceptance criteria
- A Node test runs the full pipeline on the full-brain ds005134 sub-01 on the 2 mm grid (Q67, Q68) and meets the gate of Q66 against
sdc/reference/:d ≤ max(spread, 0.05 Hz)andd < 0.5 Hz. It runs in a native workflow job (pull requests that change the SDC code, nightly, manual) with a require variable. - A Node test runs the pipeline on the slab with the full T1w (Q64) and reports its difference from the native slab runs (report only).
- Refusal tests: a missing PE direction, a missing
TotalReadoutTimeand a missing T1w give clear errors. - The output names and sidecars follow BIDS derivatives. A test loads the outputs with the input path of
n4and ofnoddi(NIfTI + bval + bvec), and both accept them. - Cancellation through an
AbortSignalstops the workers. - A changeset describes the change (
pnpm changeset).
References
Dependencies
- sdc: ANTs WebAssembly entry points for SyN-SDC (restricted SyN, Laplacian, DenoiseImage, BSpline apply) #462: sdc: ANTs WebAssembly entry points for SyN-SDC (restricted SyN, Laplacian, DenoiseImage, BSpline apply)
- sdc: Rust crate for displacement-to-field-map conversion and B-spline approximation #463: sdc: Rust crate for displacement-to-field-map conversion and B-spline approximation
- shared: BIDS folder reader for diffusion inputs (dwi, fmap IntendedFor, anat T1w) #410: shared: BIDS folder reader for diffusion inputs (dwi, fmap IntendedFor, anat T1w)
- shared: one module for BIDS-derivative names and sidecars of the DWI apps #413: shared: one module for BIDS-derivative names and sidecars of the DWI apps
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
stebo85 commentedon Oct 29, 2026
open issue audit run — 2026-10-29
P2 · Finish HMC limits and validate SDC · validation
SyN-SDC package depends on #462 passing its accuracy/memory gates; cannot treat as a quick isolated implementation.
Next action: Complete shared browser/Node pipeline after accepted #462; preserve numerical gate and pinned reference verification.
Evidence: source 1 · source 2
Priority is an audit recommendation. Closure candidates remain open pending the stated verification.
docs(dwi): refresh the build order and retire the #468 work order
docs(dwi): refresh the build order and retire the #468 work order (#636)