-
Notifications
You must be signed in to change notification settings - Fork 533
changing ANTS input traits, fixes #2245 #2261
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
Changes from 3 commits
ec5d3b1
3196726
a1d62ca
e214b54
51585be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | ||
# vi: set ft=python sts=4 ts=4 sw=4 et: | ||
|
||
from nipype.interfaces.ants import registration | ||
import os | ||
import pytest | ||
|
||
def test_ants_mand(): | ||
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. does the interface actually create files? if so (and I guess it would), we should include 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. done |
||
filepath = os.path.dirname( os.path.realpath( __file__ ) ) | ||
datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data')) | ||
|
||
ants = registration.ANTS() | ||
ants.inputs.transformation_model= "SyN" | ||
ants.inputs.moving_image = [os.path.join(datadir, 'resting.nii')] | ||
ants.inputs.fixed_image = [os.path.join(datadir, 'T1.nii')] | ||
ants.inputs.metric = [u'MI'] | ||
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. can we just import unicode literals? 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. done |
||
|
||
with pytest.raises(ValueError) as er: | ||
ants.run() | ||
assert "ANTS requires a value for input 'radius'" in str(er.value) | ||
|
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.
isn't this a pep8 warning?
Uh oh!
There was an error while loading. Please reload this page.
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.
this line doesn't give any warning, but the files indeed violates many. will edit
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.
I will actually review pep8 only for the first part I was changing, will review pep8 for entire file together with other updates