omni.pipelines.func.align#
Functions
|
Create reference image and motion correction. |
|
Deoblique functional image. |
- omni.pipelines.func.align.create_reference_and_moco(output_path: str, func_do: str, TR: float, slice_times: List[float], sed: int, loops: List[int] = [1, 1, 1], subsample: List[int] = [5, 3, 1], borders: List[int] = [1, 1, 1], use_allineate: bool = False)[source]#
Create reference image and motion correction.
This function computes a quick intensity mask to get rid of voxels that are way outside the skull. It then computes an initial DVARs estimate to exclude volumes. It finds the worst 5% of volumes by DVARs and excludes volumes adjacent to those worst volumes (a centered window of size 3). The DVARs time course is then smooothed to find long stretches (~100 frames) of minimal motion, excluding the first/last 10% of the scan.
We use these extracted frames to create a reference functional image for further processing.
- Parameters:
- output_pathstr
Output path to write out files to.
- func_dostr
Deobliqued functional image.
- TRfloat
Repetition time of scan.
- slice_timesList[float]
List of slice times.
- sedint
Axis of slice encoding direction.
- loopsList[int]
Number of loops for SpaceTimeRealign.
- subsampleList[int]
Subsampling for SpaceTimeRealign.
- bordersList[int]
Borders for SpaceTimeRealign.
- use_allineatebool
Sets whether to use 3dAllineate for framewise alignment instead.
- Returns:
- str
Path to motion corrected functional.
- str
Path to reference functional.