# sdcflows.workflows.phdiff module¶

Phase-difference B0 estimation.

## Phase-difference B0 estimation¶

The field inhomogeneity inside the scanner (fieldmap) is proportional to the phase drift between two subsequent GRE sequence.

This corresponds to this section of the BIDS specification.

Distortion correction of EPI sequences using phase-difference maps.

Estimates the fieldmap using a phase-difference image and one or more magnitude images corresponding to two or more GRE acquisitions. The most delicate bit of this workflow is the phase-unwrapping process: phase maps are clipped in the range $$[0 \dotsb 2\pi )$$. To find the integer number of offsets that make a region continously smooth with its neighbour, FSL PRELUDE is run [Jenkinson2003]. FSL PRELUDE takes wrapped maps in the range 0 to 6.28, as per the user guide. For the phase-difference maps, recentering back to $$[-\pi \dotsb \pi )$$ is necessary. After some massaging and the application of the effective echo spacing parameter, the phase-difference maps can be converted into a B0 field map in Hz units. The original code was taken from nipype.

Workflow Graph

(Source code, png, svg, pdf)

Parameters

omp_nthreads (int) – Maximum number of threads an individual process may use

Inputs
• magnitude (list of os.pathlike) – List of path(s) the GRE magnitude maps.

• phasediff (list of tuple(os.pathlike, dict)) – List containing one GRE phase-difference map with its corresponding metadata (requires EchoTime1 and EchoTime2), or the phase maps for the two subsequent echoes, with their metadata (requires EchoTime).

Outputs
• fmap_ref (pathlike) – The average magnitude image, skull-stripped