Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions nipype/interfaces/dcm2nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,22 @@ class Dcm2niixOutputSpec(TraitedSpec):

class Dcm2niix(CommandLine):
"""Uses Chris Rorden's dcm2niix to convert dicom files

Examples
========

>>> from nipype.interfaces.dcm2nii import Dcm2niix
>>> converter = Dcm2niix()
>>> converter.inputs.source_names = ['functional_1.dcm', 'functional_2.dcm']
>>> converter.inputs.compress = 'i'
>>> converter.inputs.single_file = True
>>> converter.inputs.output_dir = '.'
>>> converter.cmdline
'dcm2niix -b y -z i -m n -f %t%p -o . -s y -v n -x n -t n functional_1.dcm'
>>> converter.cmdline # doctest: +SKIP
'dcm2niix -b y -z i -x n -t n -m n -f %t%p -o . -s y -v n functional_1.dcm'

>>> flags = '-'.join([val.strip() + ' ' for val in sorted(' '.join(converter.cmdline.split()[1:-1]).split('-'))])
>>> flags
' -b y -f %t%p -m n -o . -s y -t n -v n -x n -z i '
"""

input_spec = Dcm2niixInputSpec
Expand Down
6 changes: 4 additions & 2 deletions nipype/interfaces/tests/test_runtime_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ def test_cmdline_profiling(self):

# Assert runtime stats are what was input
self.assertLessEqual(runtime_gb_err, allowed_gb_err, msg=mem_err)
self.assertEqual(expected_runtime_threads, runtime_threads, msg=threads_err)
self.assertTrue(abs(expected_runtime_threads - runtime_threads) <= 1,
msg=threads_err)

# Test resources were used as expected
@unittest.skipIf(run_profiler == False, skip_profile_msg)
Expand Down Expand Up @@ -434,7 +435,8 @@ def test_function_profiling(self):

# Assert runtime stats are what was input
self.assertLessEqual(runtime_gb_err, allowed_gb_err, msg=mem_err)
self.assertEqual(expected_runtime_threads, runtime_threads, msg=threads_err)
self.assertTrue(abs(expected_runtime_threads - runtime_threads) <= 1,
msg=threads_err)


# Command-line run-able unittest module
Expand Down