Skip to content

Commit be7c489

Browse files
committed
Editing few options on the interface FillLesions
1 parent 23dccd8 commit be7c489

File tree

2 files changed

+16
-28
lines changed

2 files changed

+16
-28
lines changed

nipype/interfaces/niftyseg/lesions.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,48 +45,47 @@ class FillLesionsInputSpec(CommandLineInputSpec):
4545

4646
# Optional arguments
4747
desc = "Dilate the mask <int> times (in voxels, by default 0)"
48-
in_dilation = traits.Int(desc=desc, argstr='-dil %d', mandatory=False)
48+
in_dilation = traits.Int(desc=desc, argstr='-dil %d')
4949

5050
desc = 'Percentage of minimum number of voxels between patches <float> \
5151
(by default 0.5).'
52-
match = traits.Float(desc=desc, argstr='-match %f', mandatory=False)
52+
match = traits.Float(desc=desc, argstr='-match %f')
5353

5454
desc = 'Minimum percentage of valid voxels in target patch <float> \
5555
(by default 0).'
56-
search = traits.Float(desc=desc, argstr='-search %f', mandatory=False)
56+
search = traits.Float(desc=desc, argstr='-search %f')
5757

5858
desc = 'Smoothing by <float> (in minimal 6-neighbourhood voxels \
5959
(by default 0.1)).'
60-
smooth = traits.Float(desc=desc, argstr='-smo %f', mandatory=False)
60+
smooth = traits.Float(desc=desc, argstr='-smo %f')
6161

6262
desc = 'Search regions size respect biggest patch size (by default 4).'
63-
size = traits.Int(desc=desc, argstr='-size %d', mandatory=False)
63+
size = traits.Int(desc=desc, argstr='-size %d')
6464

6565
desc = 'Patch cardinality weighting factor (by default 2).'
66-
cwf = traits.Float(desc=desc, argstr='-cwf %f', mandatory=False)
66+
cwf = traits.Float(desc=desc, argstr='-cwf %f')
6767

6868
desc = 'Give a binary mask with the valid search areas.'
69-
bin_mask = File(desc=desc, argstr='-mask %s', mandatory=False)
69+
bin_mask = File(desc=desc, argstr='-mask %s')
7070

7171
desc = "Guizard et al. (FIN 2015) method, it doesn't include the \
7272
multiresolution/hierarchical inpainting part, this part needs to be done \
7373
with some external software such as reg_tools and reg_resample from NiftyReg. \
7474
By default it uses the method presented in Prados et al. (Neuroimage 2016)."
75-
other = traits.Bool(desc=desc, argstr='-other', mandatory=False)
75+
other = traits.Bool(desc=desc, argstr='-other')
76+
77+
use_2d = traits.Bool(desc='Uses 2D patches in the Z axis, by default 3D.',
78+
argstr='-2D')
7679

7780
debug = traits.Bool(desc='Save all intermidium files (by default OFF).',
78-
argstr='-debug', mandatory=False)
81+
argstr='-debug')
7982

8083
desc = 'Set output <datatype> (char, short, int, uchar, ushort, uint, \
8184
float, double).'
82-
out_datatype = traits.String(desc=desc, argstr='-odt %s', mandatory=False)
85+
out_datatype = traits.String(desc=desc, argstr='-odt %s')
8386

8487
verbose = traits.Bool(desc='Verbose (by default OFF).',
85-
argstr='-v', mandatory=False)
86-
87-
# Set the number of omp thread to use
88-
omp_core = traits.Int(desc='Number of openmp thread to use. Default: 4',
89-
argstr='-omp %d')
88+
argstr='-v')
9089

9190

9291
class FillLesionsOutputSpec(TraitedSpec):

nipype/interfaces/niftyseg/tests/test_auto_FillLesions.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ def test_FillLesions_inputs():
77
input_map = dict(args=dict(argstr='%s',
88
),
99
bin_mask=dict(argstr='-mask %s',
10-
mandatory=False,
1110
),
1211
cwf=dict(argstr='-cwf %f',
13-
mandatory=False,
1412
),
1513
debug=dict(argstr='-debug',
16-
mandatory=False,
1714
),
1815
environ=dict(nohash=True,
1916
usedefault=True,
@@ -22,7 +19,6 @@ def test_FillLesions_inputs():
2219
usedefault=True,
2320
),
2421
in_dilation=dict(argstr='-dil %d',
25-
mandatory=False,
2622
),
2723
in_file=dict(argstr='-i %s',
2824
mandatory=True,
@@ -33,34 +29,27 @@ def test_FillLesions_inputs():
3329
position=2,
3430
),
3531
match=dict(argstr='-match %f',
36-
mandatory=False,
37-
),
38-
omp_core=dict(argstr='-omp %d',
3932
),
4033
other=dict(argstr='-other',
41-
mandatory=False,
4234
),
4335
out_datatype=dict(argstr='-odt %s',
44-
mandatory=False,
4536
),
4637
out_file=dict(argstr='-o %s',
4738
name_source=['in_file'],
4839
name_template='%s_lesions_filled.nii.gz',
4940
position=3,
5041
),
5142
search=dict(argstr='-search %f',
52-
mandatory=False,
5343
),
5444
size=dict(argstr='-size %d',
55-
mandatory=False,
5645
),
5746
smooth=dict(argstr='-smo %f',
58-
mandatory=False,
5947
),
6048
terminal_output=dict(nohash=True,
6149
),
50+
use_2d=dict(argstr='-2D',
51+
),
6252
verbose=dict(argstr='-v',
63-
mandatory=False,
6453
),
6554
)
6655
inputs = FillLesions.input_spec()

0 commit comments

Comments
 (0)