Skip to content

Commit 92e4ed0

Browse files
committed
Merge remote-tracking branch 'nibabel/master' into nf-nib-diff
Conflicts: generally took master version of the functions bin/nib-ls nibabel/cmdline/__init__.py nibabel/cmdline/ls.py -- chose nf-nib-diff version of main with args being passed nibabel/cmdline/utils.py
2 parents 3290a66 + 949d466 commit 92e4ed0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1418
-506
lines changed

.coveragerc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ include = */nibabel/*, */nisext/*
55
omit =
66
*/externals/*
77
*/benchmarks/*
8-
*/ast.py
9-
*/codegen.py
8+
*/tests/*

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ Satrajit Ghosh <[email protected]> Satrajit Ghosh <[email protected]>
4040
Jasper J.F. van den Bosch <[email protected]> Jasper <[email protected]>
4141
Gregory R. Lee <[email protected]> Gregory R. Lee <[email protected]>
4242
Demian Wassermann <[email protected]> Demian Wassermann <[email protected]>
43+
Paul McCarthy <[email protected]> Paul McCarthy <[email protected]>

.travis.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ cache:
1414
- $HOME/.cache/pip
1515
env:
1616
global:
17-
- DEPENDS="six numpy scipy matplotlib h5py pillow"
17+
- DEPENDS="six numpy scipy matplotlib h5py pillow pydicom"
1818
- OPTIONAL_DEPENDS=""
19-
- PYDICOM=1
2019
- INSTALL_TYPE="setup"
2120
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
2221
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
@@ -34,27 +33,23 @@ matrix:
3433
# Absolute minimum dependencies
3534
- python: 2.7
3635
env:
37-
- DEPENDS="numpy==1.7.1" PYDICOM=0
36+
- DEPENDS="numpy==1.7.1"
3837
# Absolute minimum dependencies plus oldest MPL
3938
# Check these against:
4039
# nibabel/info.py
4140
# doc/source/installation.rst
4241
# requirements.txt
4342
- python: 2.7
4443
env:
45-
- DEPENDS="numpy==1.7.1 matplotlib==1.3.1" PYDICOM=0
44+
- DEPENDS="numpy==1.7.1 matplotlib==1.3.1"
4645
# Minimum pydicom dependency
4746
- python: 2.7
4847
env:
49-
- DEPENDS="numpy==1.7.1 pydicom==0.9.7 pillow==2.6"
50-
# test against numpy 1.7
51-
- python: 2.7
52-
env:
53-
- DEPENDS="numpy==1.7.1"
54-
# pydicom 1.0 (currently unreleased)
55-
- python: 2.7
48+
- DEPENDS="numpy==1.7.1 pydicom==0.9.9 pillow==2.6"
49+
# pydicom master branch
50+
- python: 3.5
5651
env:
57-
- PYDICOM="v1.0"
52+
- DEPENDS="numpy git+https://github.com/pydicom/pydicom.git@master"
5853
# test 2.7 against pre-release builds of everything
5954
- python: 2.7
6055
env:
@@ -102,14 +97,6 @@ before_install:
10297
- pip install -U pip wheel # needed at one point
10398
- retry pip install nose flake8 mock # always
10499
- pip install $EXTRA_PIP_FLAGS $DEPENDS $OPTIONAL_DEPENDS
105-
# pydicom <= 0.9.8 doesn't install on python 3
106-
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
107-
if [ "$PYDICOM" == "1" ]; then
108-
pip install pydicom;
109-
elif [ "$PYDICOM" == "v1.0" ]; then
110-
pip install git+https://github.com/darcymason/pydicom.git@43f278444d5cb2e4648135d3edcd430c363c6975;
111-
fi
112-
fi
113100
- if [ "${COVERAGE}" == "1" ]; then
114101
pip install coverage;
115102
pip install coveralls;

Changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ Gerhard (SG) and Eric Larson (EL).
2424

2525
References like "pr/298" refer to github pull request numbers.
2626

27+
2.2.1 (Wednesday 22 November 2017)
28+
==================================
29+
30+
Bug fixes
31+
---------
32+
33+
* Set L/R labels in orthoview correctly (pr/564) (CM)
34+
* Defer use of ufunc / memmap test - allows "freezing" (pr/572) (MB, reviewed
35+
by Satra Ghosh)
36+
* Fix doctest failures with pre-release numpy (pr/582) (MB, reviewed by CM)
37+
38+
Maintenance
39+
-----------
40+
41+
* Update documentation around NIfTI qform/sform codes (pr/576) (Paul McCarthy,
42+
reviewed by MB, CM) + (pr/580) (Bennet Fauber, reviewed by Paul McCarthy)
43+
* Skip precision test on macOS, newer numpy (pr/583) (MB, reviewed by CM)
44+
* Simplify AppVeyor script, removing conda (pr/584) (MB, reviewed by CM)
45+
2746
2.2 (Friday 13 October 2017)
2847
============================
2948

appveyor.yml

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,34 @@
11
# vim ft=yaml
22
# CI on Windows via appveyor
3-
# This file was based on Olivier Grisel's python-appveyor-demo
43

54
environment:
65

76
matrix:
8-
- PYTHON: "C:\\Python27-conda32"
9-
PYTHON_VERSION: "2.7"
10-
PYTHON_ARCH: "32"
11-
12-
- PYTHON: "C:\\Python34-conda32"
13-
PYTHON_VERSION: "3.4"
14-
PYTHON_ARCH: "32"
15-
16-
- PYTHON: "C:\\Python34-conda64"
17-
PYTHON_VERSION: "3.4"
18-
PYTHON_ARCH: "64"
19-
20-
- PYTHON: "C:\\Python35-conda64"
21-
PYTHON_VERSION: "3.5"
22-
PYTHON_ARCH: "64"
23-
24-
- PYTHON: "C:\\Python35-conda32"
25-
PYTHON_VERSION: "3.5"
26-
PYTHON_ARCH: "32"
7+
- PYTHON: C:\Python27
8+
- PYTHON: C:\Python27-x64
9+
- PYTHON: C:\Python34
10+
- PYTHON: C:\Python34-x64
11+
- PYTHON: C:\Python35
12+
- PYTHON: C:\Python35-x64
13+
- PYTHON: C:\Python36
14+
- PYTHON: C:\Python36-x64
2715

2816
install:
29-
# Install miniconda Python
30-
- "powershell ./tools/install_python.ps1"
31-
3217
# Prepend newly installed Python to the PATH of this build (this cannot be
3318
# done from inside the powershell script as it would require to restart
3419
# the parent CMD process).
35-
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
36-
37-
# Set up a conda environment:
38-
- conda config --set always_yes yes
39-
- conda update -q conda
40-
- conda info -a
41-
- conda create -q -n test-environment python=%PYTHON_VERSION%
42-
- activate test-environment
43-
44-
# Check that we have the expected version and architecture for Python
45-
- "python --version"
46-
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
20+
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
4721

4822
# Install the dependencies of the project.
49-
- "conda install --yes --quiet numpy scipy matplotlib nose h5py mock"
50-
- "pip install pydicom"
51-
- "python setup.py install"
52-
- "SET NIBABEL_DATA_DIR=%CD%\\nibabel-data"
23+
- pip install numpy scipy matplotlib nose h5py mock
24+
- pip install pydicom
25+
- pip install .
26+
- SET NIBABEL_DATA_DIR=%CD%\nibabel-data
5327

5428
build: false # Not a C# project, build stuff at the test step instead.
5529

5630
test_script:
5731
# Change into an innocuous directory and find tests from installation
58-
- "mkdir for_testing"
59-
- "cd for_testing"
60-
- "nosetests --with-doctest nibabel"
32+
- mkdir for_testing
33+
- cd for_testing
34+
- nosetests --with-doctest nibabel

bin/nib-ls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Output a summary table for neuroimaging files (resolution, dimensionality, etc.)
1313

1414
from nibabel.cmdline.ls import main
1515

16+
1617
if __name__ == '__main__':
1718
main()

doc/source/coordinate_systems.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ middle voxel in the EPI data array like this:
104104
(26, 30, 16)
105105
>>> center_vox_value = epi_img_data[center_i, center_j, center_k]
106106
>>> center_vox_value
107-
81.549287796020508
107+
81.5492877960205...
108108

109109
The values (26, 30, 16) are indices into the data array ``epi_img_data``. (26,
110110
30, 16) is therefore a 'voxel coordinate' - a coordinate into the voxel array.
@@ -776,7 +776,7 @@ center of the EPI image?
776776
:nofigs:
777777

778778
>>> apply_affine(epi_vox2anat_vox, epi_vox_center)
779-
array([ 28.364, 31.562, 36.165])
779+
array([28.364, 31.562, 36.165])
780780

781781
The voxel coordinate of the center voxel of the anatomical image is:
782782

@@ -786,7 +786,7 @@ The voxel coordinate of the center voxel of the anatomical image is:
786786

787787
>>> anat_vox_center = (np.array(anat_img_data.shape) - 1) / 2.
788788
>>> anat_vox_center
789-
array([ 28. , 33. , 27.5])
789+
array([28. , 33. , 27.5])
790790

791791
The voxel location in the anatomical image that matches the center voxel of
792792
the EPI image is nearly exactly half way across the first axis, a voxel or two

doc/source/image_orientation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ Here is the affine (to two digits decimal precision):
5353

5454
>>> np.set_printoptions(precision=2, suppress=True)
5555
>>> img.affine
56-
array([[ -2. , 0. , 0. , 117.86],
57-
[ -0. , 1.97, -0.36, -35.72],
58-
[ 0. , 0.32, 2.17, -7.25],
59-
[ 0. , 0. , 0. , 1. ]])
56+
array([[ -2. , 0. , 0. , 117.86],
57+
[ -0. , 1.97, -0.36, -35.72],
58+
[ 0. , 0.32, 2.17, -7.25],
59+
[ 0. , 0. , 0. , 1. ]])
6060

6161
What are the orientations of the voxel axes here?
6262

doc/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ contributed code and discussion (in rough order of appearance):
7979
* Venky Reddy
8080
* Mark Hymers
8181
* Jasper J.F. van den Bosch
82+
* Bennet Fauber
8283

8384
License reprise
8485
===============

doc/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Requirements
9090
* NumPy_ 1.7.1 or greater
9191
* Six_ 1.3 or greater
9292
* SciPy_ (optional, for full SPM-ANALYZE support)
93-
* PyDICOM_ 0.9.7 or greater (optional, for DICOM support)
93+
* PyDICOM_ 0.9.9 or greater (optional, for DICOM support)
9494
* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS)
9595
* nose_ 0.11 or greater (optional, to run the tests)
9696
* mock_ (optional, to run the tests)

0 commit comments

Comments
 (0)