omni.pipelines.epi.align#

Functions

align_affine_epi_to_anat(output_path, ...[, ...])

Affine align func to anat

combine_transforms(output_path, raw_epi, ...)

Combine transforms to produce preprocessed files.

distortion_correction(output_path, epi_moco, ...)

Distortion correction.

omni.pipelines.epi.align.align_affine_epi_to_anat(output_path: str, ref_epi_bet: str, initial_synth_model: str = 'rbf(0;4)+rbf(1;4)+rbf(0;4)*rbf(1;4)', t1_bet: str = None, t2_bet: str = None, program: str = 'fsl', bandwidth: int = 16, initial_affine: str = None, skip_affine: bool = False, skip_synthtarget_affine: bool = False, resolution_pyramid: List[float] = [4, 2, 1], max_iterations: List[int] = [2000, 500, 100], err_tol: List[float] = [0.0001, 0.0001, 0.0005], step_size: List[float] = [0.001, 0.001, 0.001])[source]#

Affine align func to anat

Parameters:
output_path: str

Output path to write out files to.

ref_epi_bet: str

Reference EPI skullstripped.

initial_synth_model: str

Synth model.

t1_bet: str

T1 skullstripped.

t2_bet: str

T2 skullstripped.

bandwidth: int

Bandwidth for blurring kernel.

program: str

Program to use for affine alignment.

initial_affine: str

Initial affine to use instead of using internal flirt alignment.

skip_affine: bool

Skip affine alignment step.

skip_synthtarget_affine: bool

Skip synthtarget affine alignment step.

resolution_pyramid: List[float]

Resampling pyramid to use for affine alignment (mm).

max_iterations: List[int]

Max iterations for each SynthTarget call.

err_tol: List[float]

Error tolerance level for each SynthTarget call.

step_size: List[float]

Step size for gradient descent.

Returns:
str

Final func to anat affine (afni).

str

Final anat to func affine (afni).

omni.pipelines.epi.align.combine_transforms(output_path: str, raw_epi: str, final_epi_to_synth_warp: str, final_epi_to_anat_affine: str, atlas_align_affine: str, atlas: str = 'mni', atlas_label: str = 'atlas', data_resolution: float = None, use_allineate: bool = False, rigid_body_params: str = None)[source]#

Combine transforms to produce preprocessed files.

Parameters:
output_path: str

Output path to write out files to.

raw_epi: str

EPI to align to atlas.

final_epi_to_synth_warp: str

Undistorting warp for EPI.

final epi_to_anat_affine: str

Affine transform from EPI to anat.

atlas_align_affine: str

Affine transform from anat to atlas.

atlas: str

Atlas being aligned to (must match to affine provided).

atlas_labelstr

Label suffix for atlas outputs.

use_allineate: bool

Specifies that 3dAllineate was used for framewise alignment.

rigid_Body_params: str

Rigid body transform to use if allineate enabled.

Returns:
str

Atlas aligned EPI.

omni.pipelines.epi.align.distortion_correction(output_path: str, epi_moco: str, ref_epi: str, t1: str, t2: str, anat_bet_mask: str, anat_weight_mask: str, final_anat_to_epi_affine: str, final_epi_to_anat_affine: str, final_synth_model: str = 'rbf(0;12)+rbf(1;12)+rbf(0;12)*rbf(1;12)', bandwidth: int = 16, resample_resolution: float = 1, sigma_t2: float = 0.5, use_initializing_warp: bool = False, skip_synth_warp: bool = False, contrast_enhance_method: str = 'lce', initial_warp_field: str = None, SyN_step_size: List[float] = [3, 1, 0.1], SyN_smoothing: str = '2x1x0x0', SyN_shrink_factors: str = '4x3x2x1', SyN_field_variance: int = 0, noise_mask_dilation_size: int = 2, noise_mask_iterations: int = 20, noise_mask_sigma: float = 2, warp_direction: str = 'none', autobox_mask: str = None)[source]#

Distortion correction.

Parameters:
output_path: str

Output path to write out files to.

epi_mocostr

EPI image that has been motion corrected/framewise aligned.

ref_epi: str

Reference EPI image.

t1: str

T1.

t2: str

T2.

anat_bet_mask: str

Anatomical brain mask.

anat_weight_mask: str

Anatomical weight mask.

final_anat_to_epi_affine: str

Final anat to epi affine (afni).

final_epi_to_anat_affine: str

Final epi to anat affine (afni).

final_synth_model: str

Synth model.

bandwidth: int

Bandwidth for blurring kernel.

resample_resolution: float

Resample resolution space to do warps on (mm).

sigma_t2: float

Parameter to smooth T2 for initial warp.

use_initializing_warp: bool

Uses initializing warp from the T2 initial warp.

skip_synth_warp: bool

Skip the synth warp step, will only use initial T2 warp solution.

contrast_enhance_method: str

Contrast enhancement method to use, by default “lce”.

initial_warp_field: str

Uses this file as an initial warp field instead of computing it, this should be from ref_epi -> T2.

SyN_step_sizeList[float]

Set the gradient descent step size for each iteration of warp.

SyN_smoothing: str

Smoothing kernel size for each level of optimization.

SyN_shrink_factors: str

Resampling factor for each level of optimization.

SyN_field_variance: int

Field variance for SyN.

noise_mask_dilation_sizeint

Dilation size for noise mask.

noise_mask_iterations: int

Number of iterations to run noise mask LDA.

noise_mask_sigma: float

Size of gaussian smoothing kernel for noise mask.

warp_direction: str

Warp direction

autobox_mask: int

mask defining the autobox

Returns:
str

Final synthetic to EPI warp (Distort synthetic to match EPI)

str

Final EPI to synthetic warp (Undistort EPI to match synthetic)