Skip to content

ENH: Add new flags to MRtrix/preprocess.py (DWI2Tensor, MRtransform) #3365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions nipype/interfaces/mrtrix/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ class DWI2TensorInputSpec(CommandLineInputSpec):
"specified when computing the tensor."
),
)
mask = File(
exists=True,
argstr="-mask %s",
desc=(
"Only perform computation within the specified binary brain mask image."
),
)
quiet = traits.Bool(
argstr="-quiet",
position=1,
Expand Down Expand Up @@ -865,6 +872,17 @@ class MRTransformInputSpec(CommandLineInputSpec):
position=1,
desc="Invert the specified transform before using it",
)
linear_transform = File(
exists=True,
argstr="-linear %s",
position=1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused as to why all of these are position=1, but I don't think it can hurt for another one to be.

desc=(
"Specify a linear transform to apply, in the form of a 3x4 or 4x4 ascii file. "
"Note the standard reverse convention is used, "
"where the transform maps points in the template image to the moving image. "
"Note that the reverse convention is still assumed even if no -template image is supplied."
),
)
replace_transform = traits.Bool(
argstr="-replace",
position=1,
Expand Down
4 changes: 4 additions & 0 deletions nipype/interfaces/mrtrix/tests/test_auto_DWI2Tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def test_DWI2Tensor_inputs():
mandatory=True,
position=-2,
),
mask=dict(
argstr="-mask %s",
extensions=None,
),
out_filename=dict(
argstr="%s",
extensions=None,
Expand Down
5 changes: 5 additions & 0 deletions nipype/interfaces/mrtrix/tests/test_auto_MRTransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def test_MRTransform_inputs():
argstr="-inverse",
position=1,
),
linear_transform=dict(
argstr="-linear %s",
extensions=None,
position=1,
),
out_filename=dict(
argstr="%s",
extensions=None,
Expand Down