omni.pipelines.preprocessing#
Functions
|
Function for applying mask to ref epi |
|
Run Synth preprocessing pipeline. |
|
SynthUnwarp Pipeline. |
- omni.pipelines.preprocessing.make_ref_epi_bet(output_path: str, ref_epi: str, ref_epi_bet_mask: str, initial_warp_field: str, **kwargs)[source]#
Function for applying mask to ref epi
- Parameters:
- ref_epi: str
Reference EPI.
- ref_epi_bet_mask: str
Brain mask for EPI. (NOTE: if initial_warp_field provided this should be a mask after that warp)
- initial_warp_field: str
Initial distortion correction warp field.
- Returns:
- str
Brain extracted EPI.
- omni.pipelines.preprocessing.pre_proc(output_path: str, anat_path: str = 'anat', func_path: str = 'func', epi_path: str = 'epi', **kwargs) None [source]#
Run Synth preprocessing pipeline.
- Parameters:
- output_path: str
Output path to write out files to.
- anat_path: str
Subpath for anatomical outputs.
- func_path: str
Subpath for functional outputs.
- epi_path: str
Subpath for EPI outputs.
- kwargs: dict
Various keyword Arguments.
- omni.pipelines.preprocessing.synthunwarp(output_path: str, epi: str, ref_epi: str, ref_epi_bet_mask: str, anat_bet_mask: str, anat_eye_mask: str, t1_debias: str = None, t2_debias: str = None, initial_synth_model: str = 'rbf(0;4)+rbf(1;4)+rbf(0;4)*rbf(1;4)', final_synth_model: str = 'rbf(0;12)+rbf(1;12)+rbf(0;12)*rbf(1;12)', program: str = 'fsl', dilation_size: int = 30, bandwidth: int = 16, initial_affine: str = None, skip_affine: bool = False, skip_synthtarget_affine: bool = False, resolution_pyramid: List[float] = [4, 2, 1], synthtarget_max_iterations: List[int] = [2000, 500, 100], synthtarget_err_tol: List[float] = [0.0001, 0.0001, 0.0005], synthtarget_step_size: List[float] = [0.001, 0.001, 0.001], resample_resolution: float = 1, sigma_t2: float = 0.5, initial_warp_field: str = None, distortion_correction_smoothing: str = '2x1x0x0', distortion_correction_shrink_factors: str = '4x3x2x1', distortion_correction_step_size: List[float] = [3, 1, 0.1], warp_direction: str = 'none', noise_mask_dilation_size: int = 2, noise_mask_iterations: int = 20, noise_mask_sigma: float = 2, autobox_mask: str = None, **kwargs) Dict [source]#
SynthUnwarp Pipeline.
- Parameters:
- output_path: str
Output path to write out files to.
- epi: str
EPI image.
- ref_epi: str
Reference EPI image.
- ref_epi_bet_mask: str
Reference EPI brain mask.
- anat_bet_mask: str
Anatomical brain mask.
- anat_eye_mask: str
Anatomical eye mask.
- t1_debias: str
Bias field corrected T1 image.
- t2_debias: str
Bias field corrected T2 image.
- inital_synth_model: str
Initial model used to generate synthetic image.
- final_synth_model: str
Final model used to generate synthetic image.
- program: str
Program to use for affine alignment.
- dilation_size: int
Size of dilation kernel for weight mask.
- bandwidth: int
Bandwidth for Epanechnikov kernel.
- initial_affine: str
Initial affine transformation.
- skip_affine: bool
Skip affine alignment step.
- skip_synthtarget_affinebool
Skip synthtarget affine alignment step.
- resolution_pyramid: List[float]
Resampling pyramid to use for affine alignment (mm).
- synthtarget_max_iterations: List[int]
Max iterations for each SynthTarget call.
- synthtarget_err_tol: List[float]
Error tolerance level for each SynthTarget call.
- synthtarget_step_size: List[float]
Step size for gradient descent.
- resample_resolution: float
Resample resolution space to do warps on (mm).
- sigma_t2: float
Parameter to smooth T2 for initial warp.
- initial_warp_field: str
Uses this file as an initial warp field instead of computing it, this should be from ref_epi -> T2.
- distortion_correction_step_sizeList[float]
Set the gradient descent step size for each iteration of warp.
- distortion_correction_smoothing: str
Smoothing kernel size for each level of optimization.
- distortion_correction_shrink_factors: str
Resampling factor for each level of optimization.
- warp_direction: str
Warp direction
- noise_mask_dilation_sizeint
Dilation size for noise mask.
- noise_mask_iterationsint
Number of iterations to run noise mask LDA.
- noise_mask_sigmafloat
Size of gaussian smoothing kernel for noise mask.
- autobox_maskstr
Mask of autobox on functional
- Returns:
- Dict
Results of pipeline.