Skip to content

Commit

Permalink
remove slice-timing correction
Browse files Browse the repository at this point in the history
  • Loading branch information
psadil authored and oesteban committed Aug 18, 2022
1 parent a14998e commit d68baf6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 53 deletions.
6 changes: 0 additions & 6 deletions mriqc/cli/parser.py
Expand Up @@ -397,12 +397,6 @@ def _bids_filter(value):
help="DEPRECATED Final volume in functional timeseries that should be "
"considered for preprocessing.",
)
g_func.add_argument(
"--correct-slice-timing",
action="store_true",
default=False,
help="Perform slice timing correction.",
)

latest = check_latest()
if latest is not None and currentv < latest:
Expand Down
2 changes: 0 additions & 2 deletions mriqc/config.py
Expand Up @@ -489,8 +489,6 @@ class workflow(_Config):
"""Level of analysis."""
biggest_file_gb = 1
"""Size of largest file in GB."""
correct_slice_timing = False
"""Perform slice timing correction."""
deoblique = False
"""Deoblique the functional scans during head motion correction preprocessing."""
despike = False
Expand Down
1 change: 0 additions & 1 deletion mriqc/data/config-example.toml
Expand Up @@ -34,7 +34,6 @@ write_graph = false
[workflow]
analysis_level = [ "participant",]
biggest_file_gb = 0.03619009628891945
correct_slice_timing = false
deoblique = false
despike = false
fd_thres = 0.2
Expand Down
47 changes: 3 additions & 44 deletions mriqc/workflows/functional.py
Expand Up @@ -676,7 +676,7 @@ def hmc(name="fMRI_HMC"):
"""
from nipype.algorithms.confounds import FramewiseDisplacement
from nipype.interfaces.afni import Despike, Refit, TShift, Volreg
from nipype.interfaces.afni import Despike, Refit, Volreg

mem_gb = config.workflow.biggest_file_gb

Expand Down Expand Up @@ -713,54 +713,13 @@ def hmc(name="fMRI_HMC"):
])
# fmt: on

# Slice timing correction, despiking, and deoblique

st_corr = pe.Node(TShift(outputtype="NIFTI_GZ"), name="TimeShifts")
# despiking, and deoblique

deoblique_node = pe.Node(Refit(deoblique=True), name="deoblique")

despike_node = pe.Node(Despike(outputtype="NIFTI_GZ"), name="despike")

if all(
(
config.workflow.correct_slice_timing,
config.workflow.despike,
config.workflow.deoblique,
)
):

# fmt: off
workflow.connect([
(inputnode, st_corr, [("in_file", "in_file")]),
(st_corr, despike_node, [("out_file", "in_file")]),
(despike_node, deoblique_node, [("out_file", "in_file")]),
(deoblique_node, hmc, [("out_file", "in_file")]),
])
# fmt: on
elif config.workflow.correct_slice_timing and config.workflow.despike:
# fmt: off
workflow.connect([
(inputnode, st_corr, [("in_file", "in_file")]),
(st_corr, despike_node, [("out_file", "in_file")]),
(despike_node, hmc, [("out_file", "in_file")]),
])
# fmt: on
elif config.workflow.correct_slice_timing and config.workflow.deoblique:
# fmt: off
workflow.connect([
(inputnode, st_corr, [("in_file", "in_file")]),
(st_corr, deoblique_node, [("out_file", "in_file")]),
(deoblique_node, hmc, [("out_file", "in_file")]),
])
# fmt: on
elif config.workflow.correct_slice_timing:
# fmt: off
workflow.connect([
(inputnode, st_corr, [("in_file", "in_file")]),
(st_corr, hmc, [("out_file", "in_file")]),
])
# fmt: on
elif config.workflow.despike and config.workflow.deoblique:
if config.workflow.despike and config.workflow.deoblique:
# fmt: off
workflow.connect([
(inputnode, despike_node, [("in_file", "in_file")]),
Expand Down

0 comments on commit d68baf6

Please sign in to comment.