File tree Expand file tree Collapse file tree 2 files changed +45
-5
lines changed Expand file tree Collapse file tree 2 files changed +45
-5
lines changed Original file line number Diff line number Diff line change @@ -208,24 +208,24 @@ class LaplacianThicknessInputSpec(ANTSCommandInputSpec):
208
208
keep_extension = True ,
209
209
hash_files = False )
210
210
smooth_param = traits .Float (
211
- argstr = '%f ' ,
211
+ argstr = '%s ' ,
212
212
desc = 'Sigma of the Laplacian Recursive Image Filter (defaults to 1)' ,
213
213
position = 4 )
214
214
prior_thickness = traits .Float (
215
- argstr = '%f ' ,
215
+ argstr = '%s ' ,
216
216
desc = 'Prior thickness (defaults to 500)' ,
217
217
position = 5 )
218
218
dT = traits .Float (
219
- argstr = '%f ' ,
219
+ argstr = '%s ' ,
220
220
desc = 'Time delta used during integration (defaults to 0.01)' ,
221
221
position = 6 )
222
222
sulcus_prior = traits .Float (
223
- argstr = '%f ' ,
223
+ argstr = '%s ' ,
224
224
desc = 'Positive floating point number for sulcus prior. '
225
225
'Authors said that 0.15 might be a reasonable value' ,
226
226
position = 7 )
227
227
tolerance = traits .Float (
228
- argstr = '%f ' ,
228
+ argstr = '%s ' ,
229
229
desc = 'Tolerance to reach during optimization (defaults to 0.001)' ,
230
230
position = 8 )
231
231
Original file line number Diff line number Diff line change
1
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
2
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
3
+
4
+ from ..segmentation import LaplacianThickness
5
+ from .test_resampling import change_dir
6
+
7
+ import os
8
+ import pytest
9
+
10
+
11
+ @pytest .fixture ()
12
+ def change_dir (request ):
13
+ orig_dir = os .getcwd ()
14
+ filepath = os .path .dirname (os .path .realpath (__file__ ))
15
+ datadir = os .path .realpath (os .path .join (filepath , '../../../testing/data' ))
16
+ os .chdir (datadir )
17
+
18
+ def move2orig ():
19
+ os .chdir (orig_dir )
20
+
21
+ request .addfinalizer (move2orig )
22
+
23
+
24
+ @pytest .fixture ()
25
+ def create_lt ():
26
+ lt = LaplacianThickness ()
27
+ # we do not run, so I stick some not really proper files as input
28
+ lt .inputs .input_gm = 'diffusion_weighted.nii'
29
+ lt .inputs .input_wm = 'functional.nii'
30
+ return lt
31
+
32
+
33
+ def test_LaplacianThickness_defaults (change_dir , create_lt ):
34
+ lt = create_lt
35
+ base_cmd = 'LaplacianThickness functional.nii diffusion_weighted.nii functional_thickness.nii'
36
+ assert lt .cmdline == base_cmd
37
+ lt .inputs .smooth_param = 4.5
38
+ assert lt .cmdline == base_cmd + " 4.5"
39
+ lt .inputs .prior_thickness = 5.9
40
+ assert lt .cmdline == base_cmd + " 4.5 5.9"
You can’t perform that action at this time.
0 commit comments