Skip to content

Commit ac8816b

Browse files
committed
REVERT: Restore dfd113c for testing
1 parent a474254 commit ac8816b

Some content is hidden

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

44 files changed

+500
-1477
lines changed

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
# for it to be on multiple physical lines, so long as you remember: - There
55
# can't be any leading "-"s - All newlines will be removed, so use ";"s
66

7-
dist: xenial
8-
sudo: true
97
language: python
108

9+
# Run jobs on container-based infrastructure, can be overridden per job
10+
sudo: false
11+
1112
cache:
1213
directories:
1314
- $HOME/.cache/pip
@@ -21,14 +22,11 @@ env:
2122
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
2223
- PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS"
2324
python:
25+
- 3.4
2426
- 3.5
2527
- 3.6
26-
- 3.7
2728
matrix:
2829
include:
29-
- python: 3.4
30-
dist: trusty
31-
sudo: false
3230
- python: 2.7
3331
env:
3432
- COVERAGE=1

COPYING

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -121,40 +121,36 @@ Sphinx 0.6 doesn't work properly.
121121
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
122122
DAMAGE.
123123

124-
OrderedSet
124+
Ordereddict
125125
-----------
126126

127-
In ``nibabel/externals/oset.py``
127+
In ``nibabel/externals/ordereddict.py``
128128

129-
Copied from: https://files.pythonhosted.org/packages/d6/b1/a49498c699a3fda5d635cc1fa222ffc686ea3b5d04b84a3166c4cab0c57b/oset-0.1.3.tar.gz
129+
Copied from: https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz#md5=a0ed854ee442051b249bfad0f638bbec
130130

131131
::
132132

133-
Copyright (c) 2009, Raymond Hettinger, and others All rights reserved.
134-
135-
Package structured based on the one developed to odict Copyright (c) 2010, BlueDynamics Alliance, Austria
136-
137-
- Redistributions of source code must retain the above copyright notice, this
138-
list of conditions and the following disclaimer.
139-
140-
- Redistributions in binary form must reproduce the above copyright notice, this
141-
list of conditions and the following disclaimer in the documentation and/or
142-
other materials provided with the distribution.
143-
144-
- Neither the name of the BlueDynamics Alliance nor the names of its
145-
contributors may be used to endorse or promote products derived from this
146-
software without specific prior written permission.
147-
148-
THIS SOFTWARE IS PROVIDED BY BlueDynamics Alliance AS IS AND ANY EXPRESS OR
149-
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
150-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
151-
SHALL BlueDynamics Alliance BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
152-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
153-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
154-
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
155-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
156-
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
157-
OF SUCH DAMAGE.
133+
Copyright (c) 2009 Raymond Hettinger
134+
135+
Permission is hereby granted, free of charge, to any person
136+
obtaining a copy of this software and associated documentation files
137+
(the "Software"), to deal in the Software without restriction,
138+
including without limitation the rights to use, copy, modify, merge,
139+
publish, distribute, sublicense, and/or sell copies of the Software,
140+
and to permit persons to whom the Software is furnished to do so,
141+
subject to the following conditions:
142+
143+
The above copyright notice and this permission notice shall be
144+
included in all copies or substantial portions of the Software.
145+
146+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
147+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
148+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
149+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
150+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
151+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
152+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
153+
OTHER DEALINGS IN THE SOFTWARE.
158154

159155
mni_icbm152_t1_tal_nlin_asym_09a
160156
--------------------------------

Changelog

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

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

27-
2.3 (Tuesday 12 June 2018)
28-
==========================
27+
Upcoming Release
28+
================
2929

3030
New features
3131
------------
32-
* TRK <=> TCK streamlines conversion CLI tools (pr/606) (MC, reviewed by CM)
3332
* Image slicing for SpatialImages (pr/550) (CM)
3433

3534
Enhancements
3635
------------
3736
* Simplfiy MGHImage and add footer fields (pr/569) (CM, reviewed by MB)
38-
* Force sform/qform codes to be ints, rather than numpy types (pr/575) (Paul
39-
McCarthy, reviewed by MB, CM)
40-
* Auto-fill color table in FreeSurfer annotation file (pr/592) (Paul McCarthy,
41-
reviewed by CM, MB)
42-
* Set default intent code for CIFTI2 images (pr/604) (Mathias Goncalves,
43-
reviewed by CM, Satra Ghosh, MB, Tim Coalson)
44-
* Raise informative error on empty files (pr/611) (Pradeep Raamana, reviewed
45-
by CM, MB)
46-
* Accept degenerate filenames such as ``.nii`` (pr/621) (Dimitri
47-
Papadopoulos-Orfanos, reviewed by Yaroslav Halchenko)
48-
* Take advantage of ``IndexedGzipFile`` ``drop_handles`` flag to release
49-
filehandles by default (pr/614) (Paul McCarthy, reviewed by CM, MB)
5037

5138
Bug fixes
5239
---------
53-
* Preserve first point of `LazyTractogram` (pr/588) (MC, reviewed by Nil
54-
Goyette, CM, MB)
55-
* Stop adding extraneous metadata padding (pr/593) (Jon Stutters, reviewed by
56-
CM, MB)
57-
* Accept lower-case orientation codes in TRK files (pr/600) (Kesshi Jordan,
58-
MB, reviewed by MB, MC, CM)
59-
* Annotation file reading (pr/592) (Paul McCarthy, reviewed by CM, MB)
60-
* Fix buffer size calculation in ArraySequence (pr/597) (Serge Koudoro,
61-
reviewed by MC, MB, Eleftherios Garyfallidis, CM)
62-
* Resolve ``UnboundLocalError`` in Python 3 (pr/607) (Jakub Kaczmarzyk,
63-
reviewed by MB, CM)
64-
* Do not crash on non-``ImportError`` failures in optional imports (pr/618)
65-
(Yaroslav Halchenko, reviewed by CM)
66-
* Return original array from ``get_fdata`` for array image, if no cast
67-
required (pr/638, MB, reviewed by CM)
6840

6941
Maintenance
7042
-----------
71-
* Use SSH address to use key-based auth (pr/587) (CM, reviewed by MB)
72-
* Fix doctests for numpy 1.14 array printing (pr/591) (MB, reviewed by CM)
73-
* Refactor for pydicom 1.0 API changes (pr/599) (MB, reviewed by CM)
74-
* Increase test coverage, remove unreachable code (pr/602) (CM, reviewed by
75-
Yaroslav Halchenko, MB)
76-
* Move ``nib-ls`` and other programs to a new cmdline module (pr/601, pr/615)
77-
(Chris Cheng, reviewed by MB, Yaroslav Halchenko)
78-
* Remove deprecated numpy indexing (EL, reviewed by CM)
79-
* Update documentation to encourage ``get_fdata`` over ``get_data`` (pr/637,
80-
MB, reviewed by CM)
8143

8244
API changes and deprecations
8345
----------------------------
84-
* Support for ``keep_file_open = 'auto'`` as a parameter to ``Opener()`` will
85-
be deprecated in 2.4, for removal in 3.0. Accordingly, support for
86-
``openers.KEEP_FILE_OPEN_DEFAULT = 'auto'`` will be dropped on the same
87-
schedule.
88-
* Drop-in support for ``indexed_gzip < 0.7`` has been removed.
8946

9047

9148
2.2.1 (Wednesday 22 November 2017)

appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ environment:
1212
- PYTHON: C:\Python35-x64
1313
- PYTHON: C:\Python36
1414
- PYTHON: C:\Python36-x64
15-
- PYTHON: C:\Python37
16-
- PYTHON: C:\Python37-x64
1715

1816
install:
1917
# Prepend newly installed Python to the PATH of this build (this cannot be
@@ -22,7 +20,8 @@ install:
2220
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
2321

2422
# Install the dependencies of the project.
25-
- pip install numpy scipy matplotlib nose h5py mock pydicom
23+
- pip install numpy scipy matplotlib nose h5py mock
24+
- pip install pydicom
2625
- pip install .
2726
- SET NIBABEL_DATA_DIR=%CD%\nibabel-data
2827

bin/nib-diff

Lines changed: 0 additions & 17 deletions
This file was deleted.

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
# General information about the project.
8989
project = u'NiBabel'
90-
copyright = u'2006-2018, %(MAINTAINER)s <%(AUTHOR_EMAIL)s>' % rel
90+
copyright = u'2006-2017, %(MAINTAINER)s <%(AUTHOR_EMAIL)s>' % rel
9191

9292
# The version info for the project you're documenting, acts as replacement for
9393
# |version| and |release|, also used in various other places throughout the

doc/source/coordinate_systems.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ We can load up the EPI image to get the image data array:
3434

3535
>>> import nibabel as nib
3636
>>> epi_img = nib.load('downloads/someones_epi.nii.gz')
37-
>>> epi_img_data = epi_img.get_fdata()
37+
>>> epi_img_data = epi_img.get_data()
3838
>>> epi_img_data.shape
3939
(53, 61, 33)
4040

@@ -64,7 +64,7 @@ and look at slices in the three axes:
6464
:context:
6565

6666
>>> anat_img = nib.load('downloads/someones_anatomy.nii.gz')
67-
>>> anat_img_data = anat_img.get_fdata()
67+
>>> anat_img_data = anat_img.get_data()
6868
>>> anat_img_data.shape
6969
(57, 67, 56)
7070
>>> show_slices([anat_img_data[28, :, :],
@@ -255,7 +255,7 @@ axes *starts* on the right, anterior, superior of the subject, rather than
255255
*ending* on the right, anterior, superior. In other words, they would use
256256
"RAS" to refer to a coordinate system we would call "LPI". To be safe, we'll
257257
call our interpretation of the RAS convention "RAS+", meaning that Right,
258-
Anterior, Superior are all positive values on these axes.
258+
Anterior, Posterior are all positive values on these axes.
259259

260260
Some people also use "right" to mean the right hand side when an observer
261261
looks at the front of the scanner, from the foot the scanner bed.

doc/source/devel/modified_images.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ flag when anyone asks for the data, on the basis that the user may then
7777
do something to the data and you can't know if they have::
7878

7979
img = nibabel.load('some_image.nii')
80-
data = img.get_fdata()
80+
data = img.get_data()
8181
data[:] = 0
8282
img2 = nibabel.load('some_image.nii')
83-
assert not np.all(img2.get_fdata() == img.get_fdata())
83+
assert not np.all(img2.get_data() == img.get_data())
8484

8585
The image consists of the data, the affine and a header. In order to
8686
keep track of the header and affine, we could cache them when loading
@@ -96,7 +96,7 @@ When we need to know whether the image object and image file correspond, we
9696
could check the current header and current affine (the header may be separate
9797
from the affine for an SPM Analyze image) against their cached copies, if they
9898
are the same and the 'dirty' flag has not been set by a previous call to
99-
``get_fdata()``, we know that the image file does correspond to the image
99+
``get_data()``, we know that the image file does correspond to the image
100100
object.
101101

102102
This may be OK for small bits of memory like the affine and the header,

doc/source/gettingstarted.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ This information is available without the need to load anything of the main
6666
image data into the memory. Of course there is also access to the image data as
6767
a NumPy_ array
6868

69-
>>> data = img.get_fdata()
69+
>>> data = img.get_data()
7070
>>> data.shape
7171
(128, 96, 24, 2)
7272
>>> type(data)

0 commit comments

Comments
 (0)