- Notifications
You must be signed in to change notification settings - Fork 536
ENH: Wrapper for DenoiseImage #1291
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
Changes from 11 commits
Commits
Show all changes
15 commits Select commit Hold shift + click to select a range
f5c1229
ENH: Add initial nipype wrapping for Ants DenoiseImage
jessicaforbes ee81bc4
ENH: Add multiple output option for wrapped Ants DenoiseImage
jessicaforbes ef1f45d
ENH: Adds example input params for wrapped Ants DenoiseImage
jessicaforbes 133ed48
ENH: Adds DenoiseImage import to __init__.py
jessicaforbes 274544a
BUG: Fixes list indexing when assigning outputs in DenoiseImage
jessicaforbes beb2a80
ENH: Updates CHANGES file
jessicaforbes ea3312a
ENH: Adds test file for DenoiseImage
jessicaforbes 86ce74a
ENH: Removes print statement
jessicaforbes 6feccb6
ENH: Updates input_image to file in testing/data dir for doctest
jessicaforbes 5a60036
TYPO: Adds single quote
jessicaforbes 334272c
ENH: Replicates N4BiasFieldCorrection output style
jessicaforbes 2ed1344
ENH: Uses name_source/name_template instead of genfile
jessicaforbes 0da735e
Merge remote-tracking branch 'upstream/master' into enh/denoise
satra fe29433
fix: keep_extension metadata behavior has now been fixed
satra da38676
Merge pull request #13 from satra/enh/denoise
jessicaforbes 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
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
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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT | ||
from ....testing import assert_equal | ||
from ..segmentation import DenoiseImage | ||
| ||
| ||
def test_DenoiseImage_inputs(): | ||
input_map = dict(args=dict(argstr='%s', | ||
), | ||
dimension=dict(argstr='-d %d', | ||
usedefault=False, | ||
), | ||
environ=dict(nohash=True, | ||
usedefault=True, | ||
), | ||
ignore_exception=dict(nohash=True, | ||
usedefault=True, | ||
), | ||
input_image=dict(argstr='-i %s', | ||
mandatory=True, | ||
), | ||
noise_image=dict(hash_files=False, | ||
), | ||
noise_model=dict(argstr='-n %s', | ||
usedefault=True, | ||
), | ||
num_threads=dict(nohash=True, | ||
usedefault=True, | ||
), | ||
output_image=dict(argstr='-o %s', | ||
genfile=True, | ||
hash_files=False, | ||
), | ||
save_noise=dict(mandatory=True, | ||
usedefault=True, | ||
xor=['noise_image'], | ||
), | ||
shrink_factor=dict(argstr='-s %s', | ||
usedefault=True, | ||
), | ||
terminal_output=dict(nohash=True, | ||
), | ||
verbose=dict(argstr='-v', | ||
), | ||
) | ||
inputs = DenoiseImage.input_spec() | ||
| ||
for key, metadata in list(input_map.items()): | ||
for metakey, value in list(metadata.items()): | ||
yield assert_equal, getattr(inputs.traits()[key], metakey), value | ||
| ||
| ||
def test_DenoiseImage_outputs(): | ||
output_map = dict(noise_image=dict(), | ||
output_image=dict(), | ||
) | ||
outputs = DenoiseImage.output_spec() | ||
| ||
for key, metadata in list(output_map.items()): | ||
for metakey, value in list(metadata.items()): | ||
yield assert_equal, getattr(outputs.traits()[key], metakey), value |
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.
you can skip
genfile
(and the need to define_gen_filename
) if you usename_source
andname_template
(more info here: http://nipy.org/nipype/devel/cmd_interface_devel.html#creating-outputs-on-the-fly). This will simplify the interface.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.
same thing applies for
noise_image