Skip to content

Commit 57f3ca6

Browse files
committed
STY: Annotate infant anat workflow
1 parent 5475910 commit 57f3ca6

File tree

1 file changed

+25
-22
lines changed
  • nibabies/workflows/anatomical

1 file changed

+25
-22
lines changed

nibabies/workflows/anatomical/base.py

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
"""Base anatomical preprocessing."""
22
import warnings
3+
from pathlib import Path
4+
from typing import Literal, Optional, Union
35

46
from nipype.interfaces import utility as niu
57
from nipype.pipeline import engine as pe
8+
from niworkflows.engine.workflows import LiterateWorkflow
9+
from niworkflows.utils.spaces import Reference, SpatialReferences
610

711
from ... import config
812

913

1014
def init_infant_anat_wf(
1115
*,
12-
age_months,
13-
ants_affine_init,
14-
t1w,
15-
t2w,
16-
anat_modality,
17-
bids_root,
18-
existing_derivatives,
19-
freesurfer,
20-
hires,
21-
longitudinal,
22-
omp_nthreads,
23-
output_dir,
24-
segmentation_atlases,
25-
skull_strip_mode,
26-
skull_strip_template,
27-
sloppy,
28-
spaces,
29-
cifti_output=False,
30-
name="infant_anat_wf",
31-
):
16+
age_months: Optional[int],
17+
ants_affine_init: bool,
18+
t1w: list,
19+
t2w: list,
20+
anat_modality: str,
21+
bids_root: Optional[Union[str, Path]],
22+
existing_derivatives: dict,
23+
freesurfer: bool,
24+
hires: Optional[bool],
25+
longitudinal: bool,
26+
omp_nthreads: int,
27+
output_dir: Union[str, Path],
28+
segmentation_atlases: Optional[Union[str, Path]],
29+
skull_strip_mode: str,
30+
skull_strip_template: Reference,
31+
sloppy: bool,
32+
spaces: Optional[SpatialReferences],
33+
cifti_output: Optional[Literal['91k', '170k']],
34+
name: str = "infant_anat_wf",
35+
) -> LiterateWorkflow:
3236
"""
3337
3438
- T1w reference: realigning and then averaging anatomical images.
@@ -79,7 +83,6 @@ def init_infant_anat_wf(
7983
GIFTI surfaces (gray/white boundary, midthickness, pial, inflated)
8084
"""
8185
from nipype.interfaces.ants.base import Info as ANTsInfo
82-
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
8386

8487
from ...utils.misc import fix_multi_source_name
8588
from .brain_extraction import init_infant_brain_extraction_wf
@@ -122,7 +125,7 @@ def init_infant_anat_wf(
122125
precomp_mask = validated_derivatives.get("anat_mask")
123126
precomp_aseg = validated_derivatives.get("anat_aseg")
124127

125-
wf = Workflow(name=name)
128+
wf = LiterateWorkflow(name=name)
126129
desc = f"""\n
127130
Anatomical data preprocessing
128131

0 commit comments

Comments
 (0)