Skip to content

Commit fe6a12e

Browse files
committed
BF: ANTS LaplacianThickness cmdline opts fixed up
That interface had a chance to work only when no any optional options specified since cmdline specs. I also stripped opt_ prefix from tollerance since they are all optional
1 parent add9bd7 commit fe6a12e

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

nipype/interfaces/ants/segmentation.py

+20-6
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,27 @@ class LaplacianThicknessInputSpec(ANTSCommandInputSpec):
207207
name_template='%s_thickness',
208208
keep_extension=True,
209209
hash_files=False)
210-
smooth_param = traits.Float(argstr='smoothparam=%d', desc='', position=4)
210+
smooth_param = traits.Float(
211+
argstr='%f',
212+
desc='Sigma of the Laplacian Recursive Image Filter (defaults to 1)',
213+
position=4)
211214
prior_thickness = traits.Float(
212-
argstr='priorthickval=%d', desc='', position=5)
213-
dT = traits.Float(argstr='dT=%d', desc='', position=6)
214-
sulcus_prior = traits.Bool(argstr='use-sulcus-prior', desc='', position=7)
215-
opt_tolerance = traits.Float(
216-
argstr='optional-laplacian-tolerance=%d', desc='', position=8)
215+
argstr='%f',
216+
desc='Prior thickness (defaults to 500)',
217+
position=5)
218+
dT = traits.Float(
219+
argstr='%f',
220+
desc='Time delta used during integration (defaults to 0.01)',
221+
position=6)
222+
sulcus_prior = traits.Float(
223+
argstr='%f',
224+
desc='Positive floating point number for sulcus prior. '
225+
'Authors said that 0.15 might be a reasonable value',
226+
position=7)
227+
tolerance = traits.Float(
228+
argstr='%f',
229+
desc='Tolerance to reach during optimization (defaults to 0.001)',
230+
position=8)
217231

218232

219233
class LaplacianThicknessOutputSpec(TraitedSpec):

nipype/interfaces/ants/tests/test_auto_LaplacianThickness.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def test_LaplacianThickness_inputs():
77
input_map = dict(
88
args=dict(argstr='%s', ),
99
dT=dict(
10-
argstr='dT=%d',
10+
argstr='%f',
1111
position=6,
1212
),
1313
environ=dict(
@@ -30,10 +30,6 @@ def test_LaplacianThickness_inputs():
3030
nohash=True,
3131
usedefault=True,
3232
),
33-
opt_tolerance=dict(
34-
argstr='optional-laplacian-tolerance=%d',
35-
position=8,
36-
),
3733
output_image=dict(
3834
argstr='%s',
3935
hash_files=False,
@@ -43,17 +39,21 @@ def test_LaplacianThickness_inputs():
4339
position=3,
4440
),
4541
prior_thickness=dict(
46-
argstr='priorthickval=%d',
42+
argstr='%f',
4743
position=5,
4844
),
4945
smooth_param=dict(
50-
argstr='smoothparam=%d',
46+
argstr='%f',
5147
position=4,
5248
),
5349
sulcus_prior=dict(
54-
argstr='use-sulcus-prior',
50+
argstr='%f',
5551
position=7,
5652
),
53+
tolerance=dict(
54+
argstr='%f',
55+
position=8,
56+
),
5757
)
5858
inputs = LaplacianThickness.input_spec()
5959

0 commit comments

Comments
 (0)