Skip to content

Commit a1d62ca

Browse files
committed
adding a simple example to test issue 2245
1 parent 3196726 commit a1d62ca

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
2+
# vi: set ft=python sts=4 ts=4 sw=4 et:
3+
4+
from nipype.interfaces.ants import registration
5+
import os
6+
import pytest
7+
8+
def test_ants_mand():
9+
filepath = os.path.dirname( os.path.realpath( __file__ ) )
10+
datadir = os.path.realpath(os.path.join(filepath, '../../../testing/data'))
11+
12+
ants = registration.ANTS()
13+
ants.inputs.transformation_model= "SyN"
14+
ants.inputs.moving_image = [os.path.join(datadir, 'resting.nii')]
15+
ants.inputs.fixed_image = [os.path.join(datadir, 'T1.nii')]
16+
ants.inputs.metric = [u'MI']
17+
18+
with pytest.raises(ValueError) as er:
19+
ants.run()
20+
assert "ANTS requires a value for input 'radius'" in str(er.value)
21+

0 commit comments

Comments
 (0)