Skip to content

Commit 5421e97

Browse files
committed
with pre-config
1 parent a302fbd commit 5421e97

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- New switch `mask_sbref` under `func_input_prep` in functional registration and set to default `on`.
3030
- New resource `desc-head_bold` as non skull-stripped bold from nodeblock `bold_masking`.
3131
- `censor_file_path` from `offending_timepoints_connector` in the `build_nuisance_regressor` node.
32+
- `deoblique` field in pipeline config with `warp` and `refit` options to apply `3dWarp` or `3drefit` during data initialization.
3233

3334
### Changed
3435

CPAC/func_preproc/func_preproc.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ def fsl_afni_subworkflow(cfg, pipe_num, opt=None):
708708
)
709709
def func_reorient(wf, cfg, strat_pool, pipe_num, opt=None):
710710
"""Deoblique and Reorient functional timeseries."""
711+
outputs = {}
711712
if opt not in func_reorient.option_val:
712713
raise ValueError(
713714
f"\n[!] Error: Invalid option {opt} for func_reorient. \n"
@@ -726,7 +727,7 @@ def func_reorient(wf, cfg, strat_pool, pipe_num, opt=None):
726727

727728
interpolate_node = pe.Node(
728729
Function(
729-
input_names=["timing_file", "target_slices", "out_file"],
730+
input_names=["timing_file", "target_slices", "00000000000000000"],
730731
output_names=["out_file"],
731732
function=interpolate_slice_timing,
732733
),
@@ -747,6 +748,8 @@ def func_reorient(wf, cfg, strat_pool, pipe_num, opt=None):
747748
tpattern_node, tpattern = strat_pool.get_data("tpattern")
748749
wf.connect(tpattern_node, tpattern, interpolate_node, "timing_file")
749750

751+
outputs = {"tpattern": (interpolate_node, "out_file")}
752+
750753
elif opt == "refit":
751754
func_deoblique = pe.Node(
752755
interface=afni_utils.Refit(),
@@ -770,11 +773,12 @@ def func_reorient(wf, cfg, strat_pool, pipe_num, opt=None):
770773
func_reorient_node.inputs.orientation = cfg.pipeline_setup["desired_orientation"]
771774
func_reorient_node.inputs.outputtype = "NIFTI_GZ"
772775

773-
outputs = {
774-
"desc-preproc_bold": (func_reorient_node, "out_file"),
775-
"desc-reorient_bold": (func_reorient_node, "out_file"),
776-
"tpattern": (interpolate_node, "out_file"),
777-
}
776+
outputs.update(
777+
{
778+
"desc-preproc_bold": (func_reorient_node, "out_file"),
779+
"desc-reorient_bold": (func_reorient_node, "out_file"),
780+
}
781+
)
778782

779783
return (wf, outputs)
780784

CPAC/resources/configs/pipeline_config_blank.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ surface_analysis:
251251

252252
anatomical_preproc:
253253
run: Off
254+
255+
# [warp] - Deoblique the input image using AFNI 3dWarp. Changes header and the image data.
256+
# [refit] - Clear the header of the input image using AFNI 3drefit. Changes only the header.
257+
# applies for both T1w and T2w images
258+
deoblique: ["refit"]
259+
254260
acpc_alignment:
255261
T1w_brain_ACPC_template:
256262

@@ -953,6 +959,10 @@ functional_preproc:
953959
# Convert raw data from LPI to RPI
954960
run: On
955961

962+
# [warp] - Deoblique the input image using AFNI 3dWarp. Changes header and the image data. Applies interpolation to the slice-timing metadata.
963+
# [refit] - Clear the header of the input image using AFNI 3drefit. Changes only the header.
964+
deoblique: ["refit"]
965+
956966
slice_timing_correction:
957967

958968
# Interpolate voxel time courses so they are sampled at the same time points.

CPAC/resources/configs/pipeline_config_default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ anatomical_preproc:
291291
# [warp] - Deoblique the input image using AFNI 3dWarp. Changes header and the image data.
292292
# [refit] - Clear the header of the input image using AFNI 3drefit. Changes only the header.
293293
# applies for both T1w and T2w images
294-
deoblique: ["warp"]
294+
deoblique: ["refit"]
295295

296296
# Non-local means filtering via ANTs DenoiseImage
297297
non_local_means_filtering:
@@ -1027,7 +1027,7 @@ functional_preproc:
10271027
# Convert raw data from LPI to RPI
10281028
run: On
10291029

1030-
# [warp] - Deoblique the input image using AFNI 3dWarp. Changes header and the image data.
1030+
# [warp] - Deoblique the input image using AFNI 3dWarp. Changes header and the image data. Applies interpolation to the slice-timing metadata.
10311031
# [refit] - Clear the header of the input image using AFNI 3drefit. Changes only the header.
10321032
deoblique: ["refit"]
10331033

0 commit comments

Comments
 (0)