Skip to content

Commit 922db8e

Browse files
ENH: Add new flags to MRtrix/preprocess.py (DWI2Tensor, MRtransform) (#3365)
* Add -mask flag to DWI2Tensor * Add -linear flag to MRTransform * Add tests from make check-before-commit
1 parent 4d915a8 commit 922db8e

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

nipype/interfaces/mrtrix/preprocess.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ class DWI2TensorInputSpec(CommandLineInputSpec):
217217
"specified when computing the tensor."
218218
),
219219
)
220+
mask = File(
221+
exists=True,
222+
argstr="-mask %s",
223+
desc=(
224+
"Only perform computation within the specified binary brain mask image."
225+
),
226+
)
220227
quiet = traits.Bool(
221228
argstr="-quiet",
222229
position=1,
@@ -865,6 +872,17 @@ class MRTransformInputSpec(CommandLineInputSpec):
865872
position=1,
866873
desc="Invert the specified transform before using it",
867874
)
875+
linear_transform = File(
876+
exists=True,
877+
argstr="-linear %s",
878+
position=1,
879+
desc=(
880+
"Specify a linear transform to apply, in the form of a 3x4 or 4x4 ascii file. "
881+
"Note the standard reverse convention is used, "
882+
"where the transform maps points in the template image to the moving image. "
883+
"Note that the reverse convention is still assumed even if no -template image is supplied."
884+
),
885+
)
868886
replace_transform = traits.Bool(
869887
argstr="-replace",
870888
position=1,

nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ def test_DWI2Tensor_inputs():
3535
mandatory=True,
3636
position=-2,
3737
),
38+
mask=dict(
39+
argstr="-mask %s",
40+
extensions=None,
41+
),
3842
out_filename=dict(
3943
argstr="%s",
4044
extensions=None,

nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ def test_MRTransform_inputs():
2828
argstr="-inverse",
2929
position=1,
3030
),
31+
linear_transform=dict(
32+
argstr="-linear %s",
33+
extensions=None,
34+
position=1,
35+
),
3136
out_filename=dict(
3237
argstr="%s",
3338
extensions=None,

0 commit comments

Comments
 (0)