Skip to content

Commit 1d7070c

Browse files
fix: add option to bypass twopass in robustaverage
1 parent b7d72b8 commit 1d7070c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

niworkflows/interfaces/images.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ class _RobustAverageInputSpec(BaseInterfaceInputSpec):
226226
True, usedefault=True, desc="whether the output should be clipped below zero"
227227
)
228228
num_threads = traits.Int(desc="number of threads")
229+
two_pass = traits.Bool(
230+
True, usedefault=True, desc="whether two passes of correction is necessary"
231+
)
229232

230233

231234
class _RobustAverageOutputSpec(TraitedSpec):
@@ -324,7 +327,7 @@ def _run_interface(self, runtime):
324327
volreg = Volreg(
325328
in_file=self._results["out_volumes"],
326329
interp="Fourier",
327-
args="-twopass",
330+
args="-twopass" if self.inputs.two_pass else "",
328331
zpad=4,
329332
outputtype="NIFTI_GZ",
330333
)

0 commit comments

Comments
 (0)