Skip to content

Commit 503875e

Browse files
committed
fix: conflict with cifti additions
2 parents 501c352 + 2e575eb commit 503875e

File tree

168 files changed

+10100
-2345
lines changed

Some content is hidden

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

168 files changed

+10100
-2345
lines changed

.coveragerc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ branch = True
33
source = nibabel, nisext
44
include = */nibabel/*, */nisext/*
55
omit =
6-
nibabel/externals/*
7-
nibabel/benchmarks/*
8-
nisext/ast.py
9-
nisext/codegen.py
6+
*/externals/*
7+
*/benchmarks/*
8+
*/ast.py
9+
*/codegen.py

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,4 @@ Thumbs.db
7777
###################################
7878
doc/source/reference
7979
venv/
80+
.buildbot.patch

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "nibabel-data/nitest-balls1"]
2+
path = nibabel-data/nitest-balls1
3+
url = https://github.com/yarikoptic/nitest-balls1
4+
[submodule "nibabel-data/nitest-minc2"]
5+
path = nibabel-data/nitest-minc2
6+
url = git://github.com/matthew-brett/nitest-minc2.git
7+
[submodule "nipy-ecattest"]
8+
path = nibabel-data/nipy-ecattest
9+
url = https://github.com/freec84/nipy-ecattest
10+
[submodule "nibabel-data/nitest-freesurfer"]
11+
path = nibabel-data/nitest-freesurfer
12+
url = https://bitbucket.org/nipy/nitest-freesurfer.git

.mailmap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ Jean-Baptiste Poline <[email protected]> jbpoline <[email protected]>
2020
Félix C. Morency <[email protected]> Felix C. Morency <[email protected]> Félix C. Morency <[email protected]>
2121
Félix C. Morency <[email protected]> Félix C. Morency <[email protected]>
2222
Krish Subramaniam <[email protected]> Krish Subramaniam <[email protected]>
23+
Eric Larson <[email protected]> Eric89GXL <[email protected]>
24+
Alexandre Gramfort <[email protected]> Alexandre Gramfort <[email protected]>
25+
Gael Varoquaux <[email protected]> GaelVaroquaux <[email protected]>
26+
Kevin S. Hahn <[email protected]> Kevin S. Hahn <[email protected]>
27+
Basile Pinsard <[email protected]> bpinsard <[email protected]>
28+
Basile Pinsard <[email protected]> bpinsard <[email protected]>
29+

.travis.yml

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
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
language: python
7+
env:
8+
global:
9+
- DEPENDS="numpy scipy matplotlib h5py"
10+
- PYDICOM=1
711
python:
812
- 2.6
913
- 3.2
@@ -13,26 +17,59 @@ matrix:
1317
include:
1418
- python: 2.7
1519
env:
16-
- COVERAGE=--with-coverage
20+
- COVERAGE=1
21+
# Absolute minimum dependencies
22+
- python: 2.7
23+
env:
24+
- DEPENDS=numpy==1.5.1 PYDICOM=0
25+
# Minimum pydicom dependency
26+
- python: 2.7
27+
env:
28+
- DEPENDS="numpy==1.5.1 pydicom==0.9.7"
29+
# Documentation doctests
30+
- python: 2.7
31+
env:
32+
- DOC_DOC_TEST=1
1733
before_install:
34+
- virtualenv --python=python venv
35+
- source venv/bin/activate
36+
- python --version # just to check
37+
- pip install nose # always
38+
- pip install --no-index -f http://travis-wheels.scikit-image.org $DEPENDS
1839
# pydicom <= 0.9.8 doesn't install on python 3
19-
- if [[ "${TRAVIS_PYTHON_VERSION:0:1}" < "3" ]]; then
20-
pip install pydicom;
40+
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
41+
if [ "$PYDICOM" == "1" ]; then
42+
pip install pydicom;
43+
fi
2144
fi
22-
- if [ "${COVERAGE}" == "--with-coverage" ]; then
45+
- if [ "${COVERAGE}" == "1" ]; then
2346
pip install coverage;
2447
pip install coveralls;
2548
fi
49+
- if [[ $DEPENDS == *h5py* ]]; then
50+
sudo apt-get install libhdf5-serial-dev;
51+
fi
2652
# command to install dependencies
27-
# e.g. pip install -r requirements.txt # --use-mirrors
2853
install:
2954
- python setup.py install
55+
# Point to nibabel data directory
56+
- export NIBABEL_DATA_DIR="$PWD/nibabel-data"
3057
# command to run tests, e.g. python setup.py test
3158
script:
3259
# Change into an innocuous directory and find tests from installation
3360
- mkdir for_testing
3461
- cd for_testing
35-
- if [ "${COVERAGE}" == "--with-coverage" ]; then cp ../.coveragerc .; fi
36-
- nosetests --with-doctest $COVERAGE `python -c "import os; import nibabel; print(os.path.dirname(nibabel.__file__))"`
62+
- if [ "${COVERAGE}" == "1" ]; then
63+
cp ../.coveragerc .;
64+
COVER_ARGS="--with-coverage --cover-package nibabel";
65+
fi
66+
- if [ "$DOC_DOC_TEST" == "1" ]; then
67+
pip install sphinx;
68+
cd ../doc;
69+
make html;
70+
make doctest;
71+
else
72+
nosetests --with-doctest $COVER_ARGS nibabel;
73+
fi
3774
after_success:
38-
- if [ "${COVERAGE}" == "--with-coverage" ]; then coveralls; fi
75+
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi

COPYING

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
.. ex: set sts=4 ts=4 sw=4 et tw=79:
33
.. vim:syntax=rest
44
5-
65
.. _license:
76

87
**********************
@@ -19,12 +18,12 @@ documentation is covered by the MIT license.
1918

2019
The MIT License
2120

22-
Copyright (c) 2009-2011 Matthew Brett <[email protected]>
23-
Copyright (c) 2010-2011 Stephan Gerhard <[email protected]>
24-
Copyright (c) 2006-2010 Michael Hanke <[email protected]>
21+
Copyright (c) 2009-2014 Matthew Brett <[email protected]>
22+
Copyright (c) 2010-2013 Stephan Gerhard <[email protected]>
23+
Copyright (c) 2006-2014 Michael Hanke <[email protected]>
2524
Copyright (c) 2011 Christian Haselgrove <[email protected]>
2625
Copyright (c) 2010-2011 Jarrod Millman <[email protected]>
27-
Copyright (c) 2011-2012 Yaroslav Halchenko <[email protected]>
26+
Copyright (c) 2011-2014 Yaroslav Halchenko <[email protected]>
2827

2928
Permission is hereby granted, free of charge, to any person obtaining a copy
3029
of this software and associated documentation files (the "Software"), to deal
@@ -45,8 +44,8 @@ documentation is covered by the MIT license.
4544
THE SOFTWARE.
4645

4746

48-
3rd Party Code
49-
==============
47+
3rd party code and data
48+
=======================
5049

5150
Some code distributed within the nibabel sources was developed by other
5251
projects. This code is distributed under its respective licenses that are
@@ -151,7 +150,6 @@ subject to the following conditions:
151150
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
152151
OTHER DEALINGS IN THE SOFTWARE.
153152

154-
155153
mni_icbm152_t1_tal_nlin_asym_09a
156154
--------------------------------
157155

@@ -171,3 +169,38 @@ following license (where 'softwware' refers to the image):
171169
implied warranty. The authors are not responsible for any data loss,
172170
equipment damage, property loss, or injury to subjects or patients
173171
resulting from the use or misuse of this software package.
172+
173+
Philips PAR/REC data
174+
--------------------
175+
176+
The files::
177+
178+
nibabel/tests/data/phantom_EPI_asc_CLEAR_2_1.PAR
179+
nibabel/tests/data/phantom_EPI_asc_CLEAR_2_1.REC
180+
nibabel/tests/data/Phantom_EPI_3mm_cor_20APtrans_15RLrot_SENSE_15_1.PAR
181+
nibabel/tests/data/Phantom_EPI_3mm_cor_SENSE_8_1.PAR
182+
nibabel/tests/data/Phantom_EPI_3mm_sag_15AP_SENSE_13_1.PAR
183+
nibabel/tests/data/Phantom_EPI_3mm_sag_15FH_SENSE_12_1.PAR
184+
nibabel/tests/data/Phantom_EPI_3mm_sag_15RL_SENSE_11_1.PAR
185+
nibabel/tests/data/Phantom_EPI_3mm_sag_SENSE_7_1.PAR
186+
nibabel/tests/data/Phantom_EPI_3mm_tra_-30AP_10RL_20FH_SENSE_14_1.PAR
187+
nibabel/tests/data/Phantom_EPI_3mm_tra_15FH_SENSE_9_1.PAR
188+
nibabel/tests/data/Phantom_EPI_3mm_tra_15RL_SENSE_10_1.PAR
189+
nibabel/tests/data/Phantom_EPI_3mm_tra_SENSE_6_1.PAR
190+
191+
are from http://psydata.ovgu.de/philips_achieva_testfiles, and released under
192+
the PDDL version 1.0 available at http://opendatacommons.org/licenses/pddl/1.0/
193+
194+
The files::
195+
196+
nibabel/nibabel/tests/data/DTI.PAR
197+
nibabel/nibabel/tests/data/NA.PAR
198+
nibabel/nibabel/tests/data/T1.PAR
199+
nibabel/nibabel/tests/data/T2-interleaved.PAR
200+
nibabel/nibabel/tests/data/T2.PAR
201+
nibabel/nibabel/tests/data/T2_-interleaved.PAR
202+
nibabel/nibabel/tests/data/T2_.PAR
203+
nibabel/nibabel/tests/data/fieldmap.PAR
204+
205+
are from https://github.com/yarikoptic/nitest-balls1, also released under the
206+
the PDDL version 1.0 available at http://opendatacommons.org/licenses/pddl/1.0/

Changelog

Lines changed: 74 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ NiBabel Development Changelog
99
NiBabel is the successor to the much-loved PyNifti package. Here we list the
1010
releases for both packages.
1111

12-
'Close gh-' statements refer to GitHub issues that are available at::
13-
14-
http://github.com/nipy/nibabel/issues
15-
1612
The full VCS changelog is available here:
1713

1814
http://github.com/nipy/nibabel/commits/master
@@ -23,20 +19,76 @@ Releases
2319
NiBabel
2420
+++++++
2521

26-
Most work on NiBabel so far has been by Matthew Brett (MB) and Michael Hanke
27-
(MH) and Stephan Gerhard (SG). Recently there have been large contributions from
28-
Krish Subramaniam, Alexandre Gramfort, Cindee Madison, Félix C. Morency,
29-
Christian Haselgrove.
30-
31-
* Upcoming (TBA)
32-
33-
* Nifti2 read / write support
34-
* Read support for Minc2
35-
* bug fix in freesurfer.read_annot with orig_ids=False when annot contains
36-
vertices with no label.
22+
Most work on NiBabel so far has been by Matthew Brett (MB), Michael Hanke (MH)
23+
and Stephan Gerhard (SG).
24+
25+
* 2.0.0 (Tuesday 9 December 2014)
26+
27+
This release had large contributions from Eric Larson, Brendan Moloney,
28+
Nolan Nichols, Basile Pinsard, Chris Johnson and Nikolaas N. Oosterhof.
29+
30+
* New feature, bugfix release with minor API breakage;
31+
* Minor API breakage: default write of NIfTI / Analyze image data offset
32+
value. The data offset is the number of bytes from the beginning of file
33+
to skip before reading the image data. Nibabel behavior changed from
34+
keeping the value as read from file, to setting the offset to zero on
35+
read, and setting the offset when writing the header. The value of the
36+
offset will now be the minimum value necessary to make room for the header
37+
and any extensions when writing the file. You can override the default
38+
offset by setting value explicitly to some value other than zero. To read
39+
the original data offset as read from the header, use the ``offset``
40+
property of the image ``dataobj`` attribute;
41+
* Minor API breakage: data scaling in NIfTI / Analyze now set to NaN when
42+
reading images. Data scaling refers to the data intercept and slope
43+
values in the NIfTI / Analyze header. To read the original data scaling
44+
you need to look at the ``slope`` and ``inter`` properties of the image
45+
``dataobj`` attribute. You can set scaling explicitly by setting the
46+
slope and intercept values in the header to values other than NaN;
47+
* New API for managing image caching; images have an ``in_memory`` property
48+
that is true if the image data has been loaded into cache, or is already
49+
an array in memory; ``get_data`` has new keyword argument ``caching`` to
50+
specify whether the cache should be filled by ``get_data``;
51+
* Images now have properties ``dataobj``, ``affine``, ``header``. We will
52+
slowly phase out the ``get_affine`` and ``get_header`` image methods;
53+
* The image ``dataobj`` can be sliced using an efficient algorithm to avoid
54+
reading unnecessary data from disk. This makes it possible to do very
55+
efficient reads of single volumes from a time series;
56+
* NIfTI2 read / write support;
57+
* Read support for MINC2;
58+
* Much extended read support for PAR / REC, largely due to work from Eric
59+
Larson and Gregory R. Lee on new code, advice and code review. Thanks also
60+
to Jeff Stevenson and Bennett Landman for helpful discussion;
61+
* ``parrec2nii`` script outputs images in LAS voxel orientation, which
62+
appears to be necessary for compatibility with FSL ``dtifit`` /
63+
``fslview`` diffusion analysis pipeline;
64+
* Preliminary support for Philips multiframe DICOM images (thanks to Nolan
65+
Nichols, Ly Nguyen and Brendan Moloney);
66+
* New function to save Freesurfer annotation files (by Github user ohinds);
67+
* Method to return MGH format ``vox2ras_tkr`` affine (Eric Larson);
68+
* A new API for reading unscaled data from NIfTI and other images, using
69+
``img.dataobj.get_unscaled()``. Deprecate previous way of doing this,
70+
which was to read data with the ``read_img_data`` function;
71+
* Fix for bug when replacing NaN values with zero when writing floating
72+
point data as integers. If the input floating point data range did not
73+
include zero, then NaN would not get written to a value corresponding to
74+
zero in the output;
75+
* Improvements and bug fixes to image orientation calculation and DICOM
76+
wrappers by Brendan Moloney;
77+
* Bug fixes writing GIfTI files. We were using a base64 encoding that didn't
78+
match the spec, and the wrong field name for the endian code. Thanks to
79+
Basile Pinsard and Russ Poldrack for diagnosis and fixes;
80+
* Bug fix in ``freesurfer.read_annot`` with ``orig_ids=False`` when annot
81+
contains vertices with no label (Alexandre Gramfort);
82+
* More tutorials in the documentation, including introductory tutorial on
83+
DICOM, and on coordinate systems;
84+
* Lots of code refactoring, including moving to common code-base for Python
85+
2 and Python 3;
86+
* New mechanism to add images for tests via git submodules.
3787

3888
* 1.3.0 (Tuesday 11 September 2012)
3989

90+
Special thanks to Chris Johnson, Brendan Moloney and JB Poline.
91+
4092
* New feature and bugfix release
4193
* Add ability to write Freesurfer triangle files (Chris Johnson)
4294
* Relax threshold for detecting rank deficient affines in orientation
@@ -55,7 +107,8 @@ Christian Haselgrove.
55107

56108
* 1.2.1 (Wednesday 13 June 2012)
57109

58-
Particular thanks to Yaroslav Halchecko for fixes and cleanups in this release
110+
Particular thanks to Yaroslav Halchecko for fixes and cleanups in this
111+
release.
59112

60113
* Bugfix release
61114
* Make compatible with pydicom 0.9.7
@@ -67,6 +120,9 @@ Christian Haselgrove.
67120

68121
* 1.2.0 (Sunday 6 May 2012)
69122

123+
This release had large contributions from Krish Subramaniam, Alexandre
124+
Gramfort, Cindee Madison, Félix C. Morency and Christian Haselgrove.
125+
70126
* New feature and bugfix release
71127
* Freesurfer format support by Krish Subramaniam and Alexandre Gramfort.
72128
* ECAT read write support by Cindee Madison and Félix C. Morency.
@@ -83,6 +139,8 @@ Christian Haselgrove.
83139

84140
* 1.1.0 (Thursday 28 April 2011)
85141

142+
Special thanks to Chris Burns, Jarrod Millman and Yaroslav Halchenko.
143+
86144
* New feature release
87145
* Python 3.2 support
88146
* Substantially enhanced gifti reading support (SG)

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,5 +281,8 @@ tox-stale:
281281
# installed)
282282
tox -e python25,python26,python27,python32,np-1.2.1
283283

284+
refresh-readme:
285+
$(PYTHON) tools/refresh_readme.py
286+
284287
.PHONY: orig-src pylint
285288

0 commit comments

Comments
 (0)