From 7dd64d786e020c5198d45a057c146fac95ccb57a Mon Sep 17 00:00:00 2001 From: GalKepler Date: Sat, 20 Jul 2024 18:11:39 +0300 Subject: [PATCH 1/3] added available inputs for 5ttgen --- nipype/interfaces/mrtrix3/utils.py | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index 7e25288d1e..b38e3f4593 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -241,6 +241,50 @@ 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)", + usedefault=False, + ) + 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): From c46f684654fd84c2c4b2f7d2adcdb000b2be610d Mon Sep 17 00:00:00 2001 From: GalKepler Date: Sat, 20 Jul 2024 18:18:56 +0300 Subject: [PATCH 2/3] tests automatically updated --- .../mrtrix3/tests/test_auto_Generate5tt.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py index 949fa26280..abc5b0c2eb 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py @@ -28,6 +28,10 @@ def test_Generate5tt_inputs(): argstr="-fslgrad %s %s", xor=["grad_file"], ), + hippocampi=dict( + argstr="-hippocampi %s", + usedefault=False, + ), in_bval=dict( extensions=None, ), @@ -40,6 +44,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, @@ -57,6 +72,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() From 386dd145e8767c25c780fb8466a9ca3846751498 Mon Sep 17 00:00:00 2001 From: GalKepler Date: Sat, 20 Jul 2024 18:24:34 +0300 Subject: [PATCH 3/3] changed usedefault kwarg for hippocampi input --- nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py | 1 - nipype/interfaces/mrtrix3/utils.py | 1 - 2 files changed, 2 deletions(-) diff --git a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py index abc5b0c2eb..d8f6e53364 100644 --- a/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py +++ b/nipype/interfaces/mrtrix3/tests/test_auto_Generate5tt.py @@ -30,7 +30,6 @@ def test_Generate5tt_inputs(): ), hippocampi=dict( argstr="-hippocampi %s", - usedefault=False, ), in_bval=dict( extensions=None, diff --git a/nipype/interfaces/mrtrix3/utils.py b/nipype/interfaces/mrtrix3/utils.py index b38e3f4593..8a69232ecd 100644 --- a/nipype/interfaces/mrtrix3/utils.py +++ b/nipype/interfaces/mrtrix3/utils.py @@ -274,7 +274,6 @@ class Generate5ttInputSpec(MRTrix3BaseInputSpec): "aseg", argstr="-hippocampi %s", desc="Choose the method used to segment the hippocampi. (Only for 'freesurfer' algorithm)", - usedefault=False, ) white_stem = traits.Bool( argstr="-white_stem",