Skip to content
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

[ENH] Added available inputs for MRTrix3's 5ttgen #3658

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
31 changes: 31 additions & 0 deletions nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def test_Generate5tt_inputs():
argstr="-fslgrad %s %s",
xor=["grad_file"],
),
hippocampi=dict(
argstr="-hippocampi %s",
),
in_bval=dict(
extensions=None,
),
Expand All @@ -40,6 +43,17 @@ def test_Generate5tt_inputs():
mandatory=True,
position=-2,
),
lut_file=dict(
argstr="-lut %s",
extensions=None,
),
mask_file=dict(
argstr="-mask %s",
extensions=None,
),
nocrop=dict(
argstr="-nocrop",
),
nthreads=dict(
argstr="-nthreads %d",
nohash=True,
Expand All @@ -57,6 +71,23 @@ def test_Generate5tt_inputs():
mandatory=True,
position=-1,
),
premasked=dict(
argstr="-premasked",
),
sgm_amyg_hipp=dict(
argstr="-sgm_amyg_hipp",
),
t2_image=dict(
argstr="-t2 %s",
extensions=None,
),
template=dict(
argstr="-template %s",
extensions=None,
),
white_stem=dict(
argstr="-white_stem",
),
)
inputs = Generate5tt.input_spec()

Expand Down
43 changes: 43 additions & 0 deletions nipype/interfaces/mrtrix3/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,49 @@ class Generate5ttInputSpec(MRTrix3BaseInputSpec):
desc="input image / directory",
)
out_file = File(argstr="%s", mandatory=True, position=-1, desc="output image")
t2_image = File(
exists=True,
argstr="-t2 %s",
desc="Provide a T2-weighted image in addition to the default T1-weighted image. (Only for 'fsl' algorithm)",
)
mask_file = File(
exists=True,
argstr="-mask %s",
desc="Provide a brain mask image. (Only for 'fsl' algorithm)",
)
premasked = traits.Bool(
argstr="-premasked",
desc="Assume that the input image is already brain-masked. (Only for 'fsl' algorithm)",
)
nocrop = traits.Bool(
argstr="-nocrop",
desc="Do not crop the image to the region of interest.",
)
sgm_amyg_hipp = traits.Bool(
argstr="-sgm_amyg_hipp",
desc="Include the amygdala and hippocampus in the subcortical grey matter segment.",
)
template = File(
exists=True,
argstr="-template %s",
desc="Provide an image that will form the template for the generated 5TT image. (Only for 'hsvs' algorithm)",
)
hippocampi = traits.Enum(
"subfields",
"first",
"aseg",
argstr="-hippocampi %s",
desc="Choose the method used to segment the hippocampi. (Only for 'freesurfer' algorithm)",
)
white_stem = traits.Bool(
argstr="-white_stem",
desc="Classify the brainstem as white matter. (Only for 'hsvs' algorithm)",
)
lut_file = File(
exists=True,
argstr="-lut %s",
desc="Manually provide path to the lookup table on which the input parcellation image is based. (Only for 'freesurfer' algorithm)",
)


class Generate5ttOutputSpec(TraitedSpec):
Expand Down
Loading