File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,22 @@ class Dcm2niixOutputSpec(TraitedSpec):
235
235
236
236
class Dcm2niix (CommandLine ):
237
237
"""Uses Chris Rorden's dcm2niix to convert dicom files
238
+
238
239
Examples
239
240
========
241
+
240
242
>>> from nipype.interfaces.dcm2nii import Dcm2niix
241
243
>>> converter = Dcm2niix()
242
244
>>> converter.inputs.source_names = ['functional_1.dcm', 'functional_2.dcm']
243
245
>>> converter.inputs.compress = 'i'
244
246
>>> converter.inputs.single_file = True
245
247
>>> converter.inputs.output_dir = '.'
246
- >>> converter.cmdline
247
- 'dcm2niix -b y -z i -m n -f %t%p -o . -s y -v n -x n -t n functional_1.dcm'
248
+ >>> converter.cmdline # doctest: +SKIP
249
+ 'dcm2niix -b y -z i -x n -t n -m n -f %t%p -o . -s y -v n functional_1.dcm'
250
+
251
+ >>> flags = '-'.join([val.strip() + ' ' for val in sorted(' '.join(converter.cmdline.split()[1:-1]).split('-'))])
252
+ >>> flags
253
+ ' -b y -f %t%p -m n -o . -s y -t n -v n -x n -z i '
248
254
"""
249
255
250
256
input_spec = Dcm2niixInputSpec
Original file line number Diff line number Diff line change @@ -393,7 +393,8 @@ def test_cmdline_profiling(self):
393
393
394
394
# Assert runtime stats are what was input
395
395
self .assertLessEqual (runtime_gb_err , allowed_gb_err , msg = mem_err )
396
- self .assertEqual (expected_runtime_threads , runtime_threads , msg = threads_err )
396
+ self .assertTrue (abs (expected_runtime_threads - runtime_threads ) <= 1 ,
397
+ msg = threads_err )
397
398
398
399
# Test resources were used as expected
399
400
@unittest .skipIf (run_profiler == False , skip_profile_msg )
@@ -434,7 +435,8 @@ def test_function_profiling(self):
434
435
435
436
# Assert runtime stats are what was input
436
437
self .assertLessEqual (runtime_gb_err , allowed_gb_err , msg = mem_err )
437
- self .assertEqual (expected_runtime_threads , runtime_threads , msg = threads_err )
438
+ self .assertTrue (abs (expected_runtime_threads - runtime_threads ) <= 1 ,
439
+ msg = threads_err )
438
440
439
441
440
442
# Command-line run-able unittest module
You can’t perform that action at this time.
0 commit comments