-
Notifications
You must be signed in to change notification settings - Fork 535
Fix/dcm2niix #2498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix/dcm2niix #2498
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6ecd4a9
ref: dcm2niix interface
mgxd 26d82fe
tst: add datalad/dcm2niix to testing
mgxd b60b4d8
fix: dcm2niix doctest
mgxd 6d7bb8d
tst: move dcm2niix test to circle
mgxd 43c43a7
fix: forgotten changes
mgxd 4c2e885
tst: remove dcm2niix and datalad testing until neurodocker fixes
mgxd ec72e99
tst: add check for dcm2niix executable
mgxd 140b715
enh: add version checking
mgxd e904bbb
fix: version parsing
mgxd 7ba24f1
doc: add test [skip-ci]
mgxd 333c5a3
Merge branch 'fix/dcm2niix' of github.com:mgxd/nipype into fix/dcm2niix
mgxd 715de9c
Merge branch 'master' of git://github.com/nipy/nipype into fix/dcm2niix
mgxd dd0503f
fix: address review comments
mgxd c92289b
Merge branch 'master' of git://github.com/nipy/nipype into fix/dcm2niix
mgxd 41c45b9
fix: argstr and doctest
mgxd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,7 +277,7 @@ class Dcm2niixInputSpec(CommandLineInputSpec): | |
argstr="-f %s", | ||
desc="Output filename") | ||
output_dir = Directory( | ||
os.getcwd(), | ||
".", | ||
usedefault=True, | ||
exists=True, | ||
argstr='-o %s', | ||
|
@@ -323,7 +323,7 @@ class Dcm2niixInputSpec(CommandLineInputSpec): | |
desc="Flag if text notes includes private patient details") | ||
compression = traits.Enum( | ||
1, 2, 3, 4, 5, 6, 7, 8, 9, | ||
argstr='-%s', | ||
argstr='-%d', | ||
desc="Gz compression level (1=fastest, 9=smallest)") | ||
comment = traits.Str( | ||
argstr='-c %s', | ||
|
@@ -360,11 +360,6 @@ class Dcm2niix(CommandLine): | |
>>> converter.inputs.output_dir = 'ds005' | ||
>>> converter.cmdline | ||
'dcm2niix -b y -z y -5 -x n -t n -m n -o ds005 -s n -v n dicomdir' | ||
|
||
>>> flags = '-'.join([val.strip() + ' ' for val in sorted(' '.join(converter.cmdline.split()[1:-1]).split('-'))]) | ||
>>> flags | ||
' -5 -b y -m n -o ds005 -s n -t n -v n -x n -z y ' | ||
>>> converter.run() # doctest: +SKIP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we did still want the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😅 |
||
""" | ||
|
||
input_spec = Dcm2niixInputSpec | ||
|
@@ -387,6 +382,8 @@ def _format_arg(self, opt, spec, val): | |
val = True | ||
if opt == 'source_names': | ||
return spec.argstr % val[0] | ||
if opt == 'series_numbers': | ||
return ' '.join([spec.argstr % v for v in val]) | ||
return super(Dcm2niix, self)._format_arg(opt, spec, val) | ||
|
||
def _run_interface(self, runtime): | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps add:
>>> converter.run() # doctest: +SKIP
after this