Change fieldmap handling #1

Merged
msz merged 2 commits from fix-dwi-fmap into main 2026-06-12 17:20:57 +00:00
Member

The heuristic did not handle DICOM series named "dwi_acq-(...)b0ref" correctly - it placed them as "_sbref" into dwi/, while they should have been "_epi" in func. These have an opposite phase encoding direction to the main dwi acquisitions, and are intended for field map correction.

This change assigns the correct folder and suffix to these files, and adds dir-PA / dir-AP to the dwi and reference acquisitions. As a result, QSIPrep should pick these up as field maps and apply susceptibility distorsion correction.

This makes it clear that the intention was to use each field map acquisition just once. To make this more apparent in the BIDS layout, and enable Heudiconv's "CustomAcquisitionLabel" strategy for matching IntendedFor, we switch from using run- labels to acq- labels. The label will be either the corresponding task label (if intended for func) or the corresponding acquisition label (for dwi).

We still keep the ImagingVolume and Shims options: we'd rather not assign IntendedFor than assign a mismatched one.

Implementation detail: It seems that the conditional which handles protocol name with no explicit field map numbering was left over from the initial draft (it seems that protocols from Aachen, Frankfurt, and Mannheim always use run-(1/2/3) while Mannheim has a naming strategy altogether incompatible with this heuristic), but the conditional is kept (and updated) just in case.

This patch will need to propagate to each site's heuristic.

The heuristic did not handle DICOM series named "dwi_acq-(...)b0ref" correctly - it placed them as "_sbref" into dwi/, while they should have been "_epi" in func. These have an opposite phase encoding direction to the main dwi acquisitions, and are intended for field map correction. This change assigns the correct folder and suffix to these files, and adds dir-PA / dir-AP to the dwi and reference acquisitions. As a result, QSIPrep should pick these up as field maps and apply susceptibility distorsion correction. This makes it clear that the intention was to use each field map acquisition just once. To make this more apparent in the BIDS layout, and enable Heudiconv's "CustomAcquisitionLabel" strategy for matching IntendedFor, we switch from using run- labels to acq- labels. The label will be either the corresponding task label (if intended for func) or the corresponding acquisition label (for dwi). We still keep the ImagingVolume and Shims options: we'd rather not assign IntendedFor than assign a mismatched one. Implementation detail: It seems that the conditional which handles protocol name with no explicit field map numbering was left over from the initial draft (it seems that protocols from Aachen, Frankfurt, and Mannheim always use run-(1/2/3) while Mannheim has a naming strategy altogether incompatible with this heuristic), but the conditional is kept (and updated) just in case. This patch will need to propagate to each site's heuristic.
The heuristic did not handle DICOM series named "dwi_acq-(...)b0ref"
correctly - it placed them as "_sbref" into dwi/, while they should
have been "_epi" in func. These have an opposite phase encoding
direction to the main dwi acquisitions, and are intended for field map
correction.

This change assigns the correct folder and suffix to these files, and
adds dir-PA / dir-AP to the dwi and reference acquisitions. As a
result, QSIPrep should pick these up as field maps and apply
susceptibility distorsion correction.
msz changed title from WIP: Fix DWI fieldmap handling to Fix DWI fieldmap handling 2026-05-12 16:25:03 +00:00
It is now clear that the intention was to use each field map
acquisition just once. To make this more apparent in the BIDS layout,
and enable Heudiconv's "CustomAcquisitionLabel" strategy for matching
IntendedFor, we switch from using run- labels to acq- labels. The
label will be either the corresponding task label (if intended for
func) or the corresponding acquisition label (for dwi).

We still keep the ImagingVolume and Shims options: we'd rather not
assign IntendedFor than assign a mismatched one.

It seems that the conditional which handles protocol name with no
explicit field map numbering was left over from the initial draft (it
seems that protocols from Aachen, Frankfurt, and Mannheim always use
run-(1/2/3) while Mannheim has a naming strategy altogether
incompatible with this heuristic), but the conditional is kept (and
updated) just in case.
msz changed title from Fix DWI fieldmap handling to Change fieldmap handling 2026-06-03 19:10:54 +00:00
msz merged commit 3bac5005ee into main 2026-06-12 17:20:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
q01/phantom-mri-dicoms!1
No description provided.