Skip to content

Commit 02b5426

Browse files
authored
Merge pull request #74 from mgxd/enh/fs-linear-test
ENH: Add FS transform regression
2 parents 7a99841 + ef4e078 commit 02b5426

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ before_install:
2424
CI_ENV=`bash <(curl -s https://codecov.io/env)`
2525
docker pull ${DOCKER_IMAGE} # pull latest release
2626
docker run $CI_ENV -itd --name fmriprep --entrypoint=/bin/bash -v `pwd`:/opt/nt -w /opt/nt ${DOCKER_IMAGE}
27+
docker exec fmriprep sh -c 'echo "cHJpbnRmICJrcnp5c3p0b2YuZ29yZ29sZXdza2lAZ21haWwuY29tXG41MTcyXG4gKkN2dW12RVYzelRmZ1xuRlM1Si8yYzFhZ2c0RVxuIiA+IC9vcHQvZnJlZXN1cmZlci9saWNlbnNlLnR4dAo=" | base64 -d | sh'
2728
fi
2829
2930
install:

nitransforms/tests/test_linear.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
3dAllineate -base {reference} -input {moving} \
2929
-prefix resampled.nii.gz -1Dmatrix_apply {transform} -final NN\
3030
""".format,
31+
'fs': """\
32+
mri_vol2vol --mov {moving} --targ {reference} --lta {transform} \
33+
--o resampled.nii.gz --nearest --inv""".format,
3134
}
3235

3336

@@ -124,7 +127,7 @@ def test_linear_save(tmpdir, data_path, get_testdata, image_orientation, sw_tool
124127
@pytest.mark.parametrize('image_orientation', [
125128
'RAS', 'LAS', 'LPS', # 'oblique',
126129
])
127-
@pytest.mark.parametrize('sw_tool', ['itk', 'fsl', 'afni'])
130+
@pytest.mark.parametrize('sw_tool', ['itk', 'fsl', 'afni', 'fs'])
128131
def test_apply_linear_transform(
129132
tmpdir,
130133
get_testdata,
@@ -143,6 +146,8 @@ def test_apply_linear_transform(
143146
ext = ''
144147
if sw_tool == 'itk':
145148
ext = '.tfm'
149+
elif sw_tool == 'fs':
150+
ext = '.lta'
146151

147152
img.to_filename('img.nii.gz')
148153
xfm_fname = 'M.%s%s' % (sw_tool, ext)

0 commit comments

Comments
 (0)