NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2986 most downloaded on PyPI
Access a multitude of neuroimaging data formats
Last release 6 months ago
11 Mar 2026
Release timing varies
gaps range from 8 days to 1.1 years
Nearly every release is documented
notes for 42 of 45 stable releases
Nothing withdrawn
no release was ever pulled
16 years old
48 releases · first in 2010
Bug-fix release in the 5.4.x series.
Bug-fix release in the 5.4.x series.
This release fixes an issue with automated deployment to PyPI.
Adapt to numpy 2.5 deprecation of setting shape attributes ( #1452 ) (CM)
New feature release in the 5.4.x series.
This release requires a minimum Python of 3.10 and NumPy 1.25, and has been tested up to Python 3.14 and NumPy 2.4.
backports.zstd in preference to pyzstd (#1444) (PM, reviewed by CM)ushort datatypes in MGH/MGZ files (#1415) (Benjamin Thyreau, reviewed by CM)Full Changelog: 5.3.3...5.4.0
One column per quarter.
Bug-fix release in the 5.3.x series.
Bug-fix release in the 5.3.x series.
dict literal with :class:set in test. (pr/1382) (CM)Full Changelog: 5.3.2...5.3.3
Bug-fix release in the 5.3.x series.
Fix frame order for single-frame DICOM files (pr/1387) (Brendan Moloney, reviewed by CM)
Replace dict literal with set in test. (pr/1382) (CM)
Bug-fix release in the 5.3.x series.
Bug-fix release in the 5.3.x series.
Full Changelog: 5.3.1...5.3.2
Bug-fix release in the 5.3.x series.
Numpy 2.0 compatibility and addressing deprecations in numpy API ( #1304 , #1330 , #1331 , #1334 , #1337 ) (Jon Haitz Legarreta Gorroño, CM)
This release primarily adds support for Python 3.13 and Numpy 2.0.
NiBabel 6.0 will drop support for Numpy 1.x.
.content : bytes, .text : str and .json : dict properties for accessing extension contents. Exceptions will be raised on .text and .json if conversion fails. (#1336) (CM)nib-nifti-dx now supports NIfTI-2 files with a --nifti2 flag (#1323) (CM)UserWarning on np.finfo(np.longdouble). This can occur on Windows systems, but it's done in the context of checking for the problem that is being warned against, so there's no need to be noisy. (#1310) (Joshua Newton, reviewed by CM)image_position and the translation component in the affine could be incorrect (#1340) (Brendan Moloney, reviewed by CM)setup() and teardown() functions with pytest equivalents (#1325) (Sandro from the Fedora Project, reviewed by Étienne Mollier and CM)nisext (setuptools extensions) package. (#1290) (CM, reviewed by MB)Full Changelog: 5.2.1...5.3.0
Bug-fix release in the 5.2.x series.
Bug-fix release in the 5.2.x series.
git when reporting version info (#1286) (CM, reviewed by Yuri Victorovich)Full Changelog: 5.2.0...5.2.1
Remove uses of deprecated numpy.compat.py3k module ( #1243 ) (Eric Larson, reviewed by CM)
New feature release in the 5.2.x series.
This release requires a minimum Python of 3.8 and NumPy 1.20, and has been tested up to Python 3.12 and NumPy 1.26.
~/...) in strings passed to functions that accept paths (#1260) (Reinder Vos de Wael, reviewed by CM)affine=None argument (#1253) (Blake Dewey, reviewed by CM)numpy.compat.py3k module (#1243) (Eric Larson, reviewed by CM)Full Changelog: 5.1.0...5.2.0
New feature release in the 5.2.x series.
This release requires a minimum Python of 3.8 and NumPy 1.20, and has been tested up to Python 3.12 and NumPy 1.26.
Add generic ~nibabel.pointset.Pointset and regularly spaced ~nibabel.pointset.Grid data structures in preparation for coordinate transformation and resampling (pr/1251) (CM, reviewed by Oscar Esteban)
Add ~nibabel.arrayproxy.ArrayProxy.copy method to ~nibabel.arrayproxy.ArrayProxy (pr/1255) (CM, reviewed by Paul McCarthy)
Permit ~nibabel.xmlutils.XmlSerializable.to_xml methods to pass keyword arguments to xml.etree.ElementTree.tostring (pr/1258) (CM)
Allow user expansion (e.g., ~/...) in strings passed to functions that accept paths (pr/1260) (Reinder Vos de Wael, reviewed by CM)
Expand CIFTI-2 brain structures to permit synonyms (pr/1256) (CM, reviewed by Mathias Goncalves)
Annotate ~nibabel.spatialimages.SpatialImage as accepting affine=None argument (pr/1253) (Blake Dewey, reviewed by CM)
Warn on invalid MINC2 spacing declarations, treat as missing (pr/1237) (Peter Suter, reviewed by CM)
Refactor ~nibabel.nicom.utils.find_private_section for improved readability and maintainability (pr/1228) (MB, reviewed by CM)
Resolve test failure related to randomly generated invalid case (pr/1221) (CM)
Remove references to NiPy data packages from documentation (pr/1275) (Dimitri Papadopoulos, reviewed by CM, MB)
Quality of life improvements for CI, including color output and OIDC publishing (pr/1282) (CM)
Patch for NumPy 2.0 pre-release compatibility (pr/1250) (Mathieu Scheltienne and EL, reviewed by CM)
Add spellchecking to tox, CI and pre-commit (pr/1266) (CM)
Add py312-dev-x64 environment to Tox to test NumPy 2.0 pre-release compatibility (pr/1267) (CM, reviewed by EL)
Resurrect tox configuration to cover development workflows and CI checks (pr/1262) (CM)
Updates for Python 3.12 support (pr/1247, pr/1261, pr/1273) (CM)
Remove uses of deprecated numpy.compat.py3k module (pr/1243) (Eric Larson, reviewed by CM)
Various fixes for typos and style issues detected by Codespell, pyupgrade and refurb (pr/1263, pr/1269, pr/1270, pr/1271, pr/1276) (Dimitri Papadopoulos, reviewed by CM)
Use stable argsorts in PARREC tests to ensure consistent behavior on systems with AVX512 SIMD instructions and numpy 1.25 (pr/1234) (CM)
Resolve CodeCov submission failures (pr/1224) (CM)
Link to logo with full URL to avoid broken links in PyPI (pr/1218) (CM, reviewed by Zvi Baratz)
The nibabel.pydicom_compat module is deprecated and will be removed in NiBabel 7.0. (pr/1280)
The ~nibabel.casting.int_to_float and ~nibabel.casting.as_int functions are no longer needed to work around NumPy deficiencies and have been deprecated (pr/1272) (CM, reviewed by EL)
Type annotations for nibabel.loadsave (pr/1213) and nibabel.spatialimages.SpatialImage APIs (pr/1179), nibabel.deprecated , nibabel.deprecator , nibab…
New feature release in the 5.1.x series.
Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre Côté (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, Stephan Gerhard and Ross Markello (RM).
References like "pr/298" refer to github pull request numbers.
imagestats available with import nibabel (pr/1208) (Fabian Perez, reviewed by CM)nibabel.loadsave (pr/1213) and nibabel.spatialimages.SpatialImage APIs (pr/1179), nibabel.deprecated, nibabel.deprecator, nibabel.onetime and nibabel.optpkg modules (pr/1188), nibabel.volumeutils (pr/1189), nibabel.filename_parser and nibabel.openers (pr/1197) (CM, reviewed by Zvi Baratz)nibabel._compression module, resolving unexpected errors from pyzstd. (pr/1212) (CM)_version.pyi stub to allow mypy to run without building nibabel (pr/1210) (CM)Full Changelog: 5.0.1...5.1.0
Bug-fix release in the 5.0.x series.
Bug-fix release in the 5.0.x series.
Support ragged voxel arrays in ~nibabel.cifti2.cifti2_axes.ParcelsAxis (pr/1194) (Michiel Cottaar, reviewed by CM)
Return to cwd on exception in ~nibabel.tmpdirs.InTemporaryDirectory (pr/1184) (CM)
Add py.typed to module root to enable use of types in downstream projects (CM, reviewed by Fernando Pérez-Garcia)
Cache git-archive separately from Python packages in GitHub Actions (pr/1186) (CM, reviewed by Zvi Baratz)
Code support for tests covering deprecated functionality (pr/1159) (CM)
New feature release in the 5.0.x series.
~nibabel.filebasedimages.SerializableImage now has ~nibabel.filebasedimages.SerializableImage.to_stream() and ~nibabel.filebasedimages.SerializableImage.from_stream() methods to read/write streams implementing the ~io.IOBase interface. A ~nibabel.filebasedimages.SerializableImage.from_url() method enables loading images from URLs. (pr/1129) (CM, reviewed by MB)
~nibabel.streamlines.trk.TrkFile supports TRKv3, an undocumented but generally compatible variant of TRKv2. (pr/1125) (CM)
Support multiline header fields in ~nibabel.streamlines.tck.TCKFile (pr/1175) (CM, reviewed by Matt Cieslak)
Make layout order an initialization parameter of ~nibabel.arrayproxy.ArrayProxy (pr/1131) (CM, reviewed by MB)
Initial support for type annotations. (pr/1115, pr/1178) (CM, reviewed by Zvi Baratz)
Handle extension/file-format mismatches implemented incompletely in pr/1013 (pr/1138) (CM, reviewed by Thomas Phil)
Improve handling of invalid TCK files, which could sometimes cause an infinite loop (pr/1140) (Anibal Solon, reviewed by CM)
Clean up ECAT test case that left filehandle open and failed to use class variables (pr/1155) (Dimitri Papadopoulos, reviewed by CM)
Simplify TCK reading code by assuming files are open in binary mode (pr/1142) (Anibal Solon, reviewed by MC, CM)
Code support for tests covering deprecated functionality (pr/1159) (CM)
Miscellaneous code cleanups (pr/1148, pr/1149, pr/1153, pr/1154, pr/1156) (Dimitri Papadopoulos, reviewed by CM)
Update CI to build, test and deploy PyPI artifacts (pr/1134) (CM, reviewed by MB)
Transition from setup.cfg to pyproject.toml package configuration (pr/1133) (CM, reviewed by MB)
Addressed race conditions preventing running tests with pytest-xdist. (pr/1157, pr/1158) (CM, reviewed by Christian Haselgrove)
Apply blue and isort auto-formatters and provide pre-commit configuration to reduce human burden of style guidelines. (pr/1124, pr/1165, pr/1169) (CM and Zvi Baratz)
Manage versioning with setuptools_scm (pr/1171) (CM, reviewed by Zvi Baratz)
Reduce installed package size by excluding very large test file (pr/1176) (CM, reviewed by Zvi Baratz)
Passing an int64 array to ~nibabel.nifti1.Nifti1Image without a header or dtype argument will raise a ValueError. (pr/1173) (CM)
nibabel.tmpdirs.TemporaryDirectory is deprecated in favor of tempfile.TemporaryDirectory. (pr/1172) (CM, reviewed by Zvi Baratz)
The nisext package is deprecated and will be removed in NiBabel 6.0. (pr/1170) (CM, reviewed by MB)
Drop support for Python 3.7, Numpy < 1.19 (pr/1177) (CM)
The following deprecated functions and methods will now raise ExpiredDeprecationErrors
nibabel.loadsave.read_img_data
nibabel.dataobj_images.DataobjImage.get_data
nibabel.loadsave.guessed_image_type
nibabel.onetime.setattr_on_read
nibabel.orientations.flip_axis
Modules, classes and functions that expired at 4.0 were fully removed. ExpiredDeprecationErrors will now be AttributeErrors.
Make GiftiMetaData.data a list proxy, deprecate (pr/1127) (CM, reviewed by Hao-Ting Wang)
Bug-fix release in the 4.0.x series.
Make GiftiMetaData.data a list proxy, deprecate (pr/1127) (CM, reviewed by Hao-Ting Wang)
Finalize deprecation of ArrayWriter.to_fileobj(nan2zero=...) argument (pr/1126) (CM)
Finalize 4.0 deprecations, converting tests expecting DeprecationWarning to expected ExpiredDeprecationError (pr/1117) (CM)
Bug-fix release in the 4.0.x series.
Finalize 4.0 deprecations, converting tests expecting DeprecationWarning to expected ExpiredDeprecationError (pr/1117) (CM)
Suppress new numpy warning on nan-to-int cast (pr/1118) (CM, reviewed by MB)
Drop uses of deprecated distutils (pr/1073) (CM, reviewed by MB)
New feature release in the 4.0.x series.
nib-convert CLI tool to make image type and data dtype conversion accessible via the command line. (pr/1113) (CM, reviewed by Ariel Rokem)
Add 'mask', 'compat' and 'smallest' dtype aliases to NIfTI images to allow for dtype specifications that can depend on the contents of the data. 'mask' is a synonym for uint8. 'compat' will find the nearest Analyze-compatible (therefore widely supported) dtype that will not truncate the data. 'smallest' attempts to find the smallest integer dtype that will contain the data. (pr/1096) (CM, reviewed by Chris Rorden and Josh Teves)
Add dtype arguments to Cifti2Image (pr/1111) (CM)
Allow dtypes to be passed to Analyze-like images at __init__() and to_filename() to provide better control over output images. (pr/1082) (CM, following discussions with Chris Rorden, Josh Teves, Jerome Dockes, and MB)
Allow compressed GIFTI images (MB, reviewed by CM)
Add zstd compression support (pr/1005) (Andrew Van, reviewed by CM)
Support ExternalFileBinary GIFTI data arrays (PM, reviewed by CM)
Document InTemporaryDirectory as non-thread-safe (pr/1103) (Jacob Roberts, reviewed by MB)
Unify Caret-XML-style metadata structure (GiftiMetaData, Cifti2MetaData) as dict-like (pr/1091) (CM, reviewed by Josh Teves and Hao-Ting Wang)
Add __repr__ methods to GIFTI objects (pr/1092) (CM, reviewed by Josh Teves and Hao-Ting Wang)
Create gzip header deterministically by default (pr/1024) (CM, reviewed by YOH)
Provide clear error message when files with zip extensions don't match file contents (pr/1013) (Jérôme Dockès, reviewed by CM)
Re-import externals/netcdf.py from scipy to resolve numpy API change (pr/1110) (CM)
Resize ArraySequence.data without helper function to avoid reference increment (pr/1093) (MC, reviewed by CM)
Update submodule URLs to use https over git protocol (pr/1097) (CM)
Published BIAP 9: CoordinateImage API (pr/1084) (CM)
Drop uses of deprecated distutils (pr/1073) (CM, reviewed by MB)
Suppress LGTM false alarm "Clear-text logging of sensitive information" (pr/1052) (Dimitri Papadopoulos, reviewed by CM)
Test on Python 3.10 (pr/1047) (CM)
Fix typos found by codespell (pr/1040, pr/1044) (Dimitri Papadopoulos, reviewed by CM)
Run stable tests weekly, pre-release tests nightly (pr/1025) (CM)
Documentation updates to establish/clarify governance and decision making (pr/1019, pr/1020, pr/1022, pr/1018, pr/1017, pr/1016) (MB and CM)
Writing NIfTIs with 64-bit integer dtypes is getting harder. Passing (u)int64 arrays to Nifti1Image and subclasses will warn unless a header or dtype option is passed; in the future this will become an error. Additionally, passing int or 'int' to set_data_dtype() now raises an error, requiring an explicit numpy dtype to make 64-bit integer images. (pr/1082) (CM, following discussions with Chris Rorden, Josh Teves, Jerome Dockes, and MB)
Drop support for Python 3.6, Numpy < 1.17 (pr/1079) (CM)
Fully removed the following APIs, which have raised errors on use since 3.0 (pr/980) (CM, reviewed by Jonathan Daniel)
nibabel.trackvis
nibabel.volumeutils.calculate_scale
nibabel.volumeutils.can_cast
nibabel.volumeutils.scale_min_max
nibabel.dataobj_images.DataobjImage.get_shape
nibabel.minc1.MincImage (use Minc1Image)
nibabel.minc1.MincFile (use Minc1File)
nibabel.filebasedimages.FileBasedImage.from_files
nibabel.filebasedimages.FileBasedImage.filespec_to_files
nibabel.filebasedimages.FileBasedImage.to_filespec
nibabel.filebasedimages.FileBasedImage.to_files
nibabel.arrayproxy.ArrayProxy.header
keep_file_open=="auto" parameter to load method (now must be boolean)
Nothing published for this version
Suggest nibabel.save() on calls to deprecated giftiio.write() (pr/1055) (Anibal Solon, reviewed by CM)
Bug fix release in the 3.2.x series.
Reshape CIFTI-2 affines to 4x4 when encoded as row-major sequence (pr/1059) (Andrew Van, reviewed by CM)
Suggest nibabel.save() on calls to deprecated giftiio.write() (pr/1055) (Anibal Solon, reviewed by CM)
Various bugs and style issues detected by LGTM (pr/1043, pr/1048) (Dimitri Papadopoulos, reviewed by CM)
Resolve unclosed file warning in GiftiImage (pr/1038) (Lea Waller, reviewed by CM)
Fix typos preventing deprecation warnings from being raised (pr/991) (Jonathan Daniel, reviewed by MB)
Work around numpy SystemError to maintain expected error types (pr/1051) (CM)
Use more constrained mock when testing optpkg (pr/983) (CM, reviewed by YOH)
Add setuptools requirement to match usage (pr/1009) (Tomáš Hrnčiar, reviewed by CM)
Fix grammar of headings in CoC (pr/996) (MB, reviewed by CM, Ariel Rokem)
Set minimum pydicom to 1.0.0 (pr/1050) (CM)
Submit coverage to codecov via pinned PyPI package (pr/1008) (CM)
Upgrade versioneer to 0.19 (pr/967) (CM)
Migrate to GitHub actions (pr/972) (CM, reviewed by Serge Koudoro)
Bug fix release in the 3.2.x series.
Bug fix release in the 3.2.x series.
Drop references to builtin types in Numpy namespace like np.float (pr/964) (EL, reviewed by CM)
Ensure compatibility with Python 3.9 (pr/963) (CM)
Warn on use of onetime.setattr_on_read, which has been a deprecated alias of auto_attr (pr/948) (CM, reviewed by Ariel Rokem)
New feature release in the 3.2.x series.
nib-stats CLI tool to expose new nibabel.imagestats API. Initial implementation of volume calculations, a la fslstats -V. (Julian Klug, reviewed by CM and GitHub user 0rC0)
nib-roi CLI tool to crop images and/or flip axes (pr/947) (CM, reviewed by Chris Cheng and Mathias Goncalves)
Parser for Siemens "ASCCONV" text format (pr/896) (Brendan Moloney and MB, reviewed by CM)
Drop confusing mention of img.to_filename() in getting started guide (pr/946) (Fernando Pérez-Garcia, reviewed by MB, CM)
Implement to_bytes()/from_bytes() methods for Cifti2Image (pr/938) (CM, reviewed by Mathias Goncalves)
Clean up of DICOM documentation (pr/910) (Jonathan Daniel, reviewed by MB)
Use canvas manager API to set title in OrthoSlicer3D (pr/958) (EL, reviewed by CM)
Record units as seconds parrec2nii; previously set TR to seconds but retained msec units (pr/931) (CM, reviewed by MB)
Reflect on-disk dimensions in NIfTI-2 view of CIFTI-2 images (pr/930) (Mathias Goncalves and CM)
Fix outdated Python 2 and Sympy code in DICOM derivations (pr/911) (MB, reviewed by CM)
Change string with invalid escape to raw string (pr/909) (EL, reviewed by MB)
Fix typo in docs (pr/955) (Carl Gauthier, reviewed by CM)
Purge nose from nisext tests (pr/934) (Markéta Calábková, reviewed by CM)
Suppress expected warnings in tests (pr/949) (CM, reviewed by Dorota Jarecka)
Various cleanups and modernizations (pr/916, pr/917, pr/918, pr/919) (Jonathan Daniel, reviewed by CM)
SVG logo for improved appearance in with zooming (pr/914) (Jonathan Daniel, reviewed by CM)
Drop support for Numpy < 1.13 (pr/922) (CM)
Warn on use of onetime.setattr_on_read, which has been a deprecated alias of auto_attr (pr/948) (CM, reviewed by Ariel Rokem)
Bug-fix release in the 3.1.x series.
Bug-fix release in the 3.1.x series.
These are small compatibility fixes that support ARM64 architecture and indexed_gzip>=1.3.0.
Detect IndexedGzipFile as compressed file type (pr/925) (PM, reviewed by CM)
Correctly cast nan when testing array_to_file, fixing ARM64 builds (pr/862) (CM, reviewed by MB)
kw_only_meth/kw_only_func decorators are deprecated (pr/848) (RM, reviewed by CM)
New feature release in the 3.1.x series.
Conformation function (processing.conform) and CLI tool (nib-conform) to apply shape, orientation and zooms (pr/853) (Jakub Kaczmarzyk, reviewed by CM, YOH)
Affine rescaling function (affines.rescale_affine) to update dimensions and voxel sizes (pr/853) (CM, reviewed by Jakub Kaczmarzyk)
Delay import of h5py until needed (pr/889) (YOH, reviewed by CM)
Fix typo in documentation (pr/893) (Zvi Baratz, reviewed by CM)
Tests converted from nose to pytest (pr/865 + many sub-PRs) (Dorota Jarecka, Krzyzstof Gorgolewski, Roberto Guidotti, Anibal Solon, and Or Duek)
kw_only_meth/kw_only_func decorators are deprecated (pr/848) (RM, reviewed by CM)
Attempt to find versioneer version when building docs (pr/894) (CM)
Attempt to find versioneer version when building docs (pr/894) (CM)
Delay import of h5py until needed (backport of pr/889) (YOH, reviewed by CM)
Fix typo in documentation (backport of pr/893) (Zvi Baratz, reviewed by CM)
Set minimum matplotlib to 1.5.3 to ensure wheels are available on all supported Python versions. (backport of pr/887) (CM)
Remove pyproject.toml for now. (issue/859) (CM)
Validate ExpiredDeprecationError\s, promoted by 3.0 release from DeprecationWarning\s. (pr/857) (CM)
Test failed by using array method on tuple. (pr/860) (Ben Darwin, reviewed by CM)
Validate ExpiredDeprecationErrors, promoted by 3.0 release from DeprecationWarnings. (pr/857) (CM)
Remove logic accommodating numpy without float16 types. (pr/866) (CM)
Accommodate new numpy dtype strings. (pr/858) (CM)
Re-import externals/netcdf.py from scipy to resolve numpy deprecation (pr/821) (CM)
ArrayProxy __array__() now accepts a dtype parameter, allowing numpy.array(dataobj, dtype=...) calls, as well as casting directly with a dtype (for example, numpy.float32(dataobj)) to control the output type. Scale factors (slope, intercept) are applied, but may be cast to narrower types, to control memory usage. This is now the basis of img.get_fdata(), which will scale data in single precision if the output type is float32. (pr/844) (CM, reviewed by Alejandro de la Vega, Ross Markello)
GiftiImage method agg_data() to return usable data arrays (pr/793) (Hao-Ting Wang, reviewed by CM)
Accept os.PathLike objects in place of filenames (pr/610) (Cameron Riddell, reviewed by MB, CM)
Function to calculate obliquity of affines (pr/815) (Oscar Esteban, reviewed by MB)
Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed by Alejandro de la Vega)
Document SpatialImage.slicer interface (pr/846) (CM)
get_fdata(dtype=np.float32) will attempt to avoid casting data to np.float64 when scaling parameters would otherwise promote the data type unnecessarily. (pr/833) (CM, reviewed by Ross Markello)
ArraySequence now supports a large set of Python operators to combine or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB)
Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) (Henry Braun, reviewed by CM)
Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, reviewed by MB)
Sliced Tractograms no longer apply_affine to the original Tractogram's streamlines. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB)
Change strings with invalid escapes to raw strings (pr/827) (EL, reviewed by CM)
Re-import externals/netcdf.py from scipy to resolve numpy deprecation (pr/821) (CM)
Remove replicated metadata for packaged data from MANIFEST.in (pr/845) (CM)
Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM)
Manage versioning with slightly customized Versioneer (pr/786) (CM)
Reference Nipy Community Code and Nibabel Developer Guidelines in GitHub community documents (pr/778) (CM, reviewed by MB)
Fully remove deprecated checkwarns and minc modules. (pr/852) (CM)
The keep_file_open argument to file load operations and ArrayProxys no longer accepts the value "auto", raising a ValueError. (pr/852) (CM)
Deprecate ArraySequence.data in favor of ArraySequence.get_data(), which will return a copy. ArraySequence.data now returns a read-only view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB)
Deprecate DataobjImage.get_data() API, to be removed in nibabel 5.0 (pr/794, pr/809) (CM, reviewed by MB)
Nothing published for this version
Nothing published for this version
Re-import externals/netcdf.py from scipy to resolve numpy deprecation (pr/821) (CM)
Bug-fix release in the 2.5.x series. This is an extended-support series, providing bug fixes for Python 2.7 and 3.4.
This and all future releases in the 2.5.x series will be incompatible with Python 3.9. The last compatible series of numpy and scipy are 1.16.x and 1.2.x, respectively.
If you are able to upgrade to Python 3, it is recommended to upgrade to NiBabel 3.
Change strings with invalid escapes to raw strings (pr/827) (EL, reviewed by CM)
Re-import externals/netcdf.py from scipy to resolve numpy deprecation (pr/821) (CM)
Set maximum numpy to 1.16.x, maximum scipy to 1.2.x (pr/901) (CM)
Deprecate nicom.dicomwrappers.Wrapper.get_affine() in favor of affine property; final removal in nibabel 4.0 (pr/796) (YOH, reviewed by CM)
Ignore endianness in nib-diff if values match (pr/799) (YOH, reviewed by CM)
Correctly handle Philips DICOMs w/ derived volume (pr/795) (Mathias Goncalves, reviewed by CM)
Raise CSA tag limit to 1000, parametrize for future relaxing (pr/798, backported to 2.5.x in pr/800) (Henry Braun, reviewed by CM, MB)
Coerce data types to match NIfTI intent codes when writing GIFTI data arrays (pr/806) (CM, reported by Tom Holroyd)
Require h5py 2.10 for Windows + Python < 3.6 to resolve unexpected dtypes in Minc2 data (pr/804) (CM, reviewed by YOH)
Deprecate nicom.dicomwrappers.Wrapper.get_affine() in favor of affine property; final removal in nibabel 4.0 (pr/796) (YOH, reviewed by CM)
Effect threatened warnings and set some deprecation timelines (pr/755) (CM)
The 2.5.x series is the last with support for either Python 2 or Python 3.4. Extended support for this series 2.5 will last through December 2020.
Thanks for the test ECAT file and fix provided by Andrew Crabb.
Add SerializableImage class with to/from_bytes methods (pr/644) (CM, reviewed by MB)
Check CIFTI-2 data shape matches shape described by header (pr/774) (Michiel Cottaar, reviewed by CM)
Handle stricter numpy casting rules in tests (pr/768) (CM) reviewed by PM)
TRK header fields flipped in files written on big-endian systems (pr/782) (CM, reviewed by YOH, MB)
Load multiframe ECAT images with Python 3 (CM and Andrew Crabb)
Fix CodeCov paths on Appveyor for more accurate coverage (pr/769) (CM)
Move to setuptools and reduce use nisext functions (pr/764) (CM, reviewed by YOH)
Better handle test setup/teardown (pr/785) (CM, reviewed by YOH)
Effect threatened warnings and set some deprecation timelines (pr/755) (CM) * Trackvis methods now default to v2 formats * nibabel.trackvis scheduled for removal in nibabel 4.0 * nibabel.minc and nibabel.MincImage will be removed in nibabel 3.0
Pacify FutureWarning and DeprecationWarning from h5py, numpy (pr/760) (CM)
Contributions from Egor Pafilov, Jath Palasubramaniam, Richard Nemec, and Dave Allured.
Enable mmap, keep_file_open options when loading any DataobjImage (pr/759) (CM, reviewed by PM)
Ensure loaded GIFTI files expose writable data arrays (pr/750) (CM, reviewed by PM)
Safer warning registry manipulation when checking for overflows (pr/753) (CM, reviewed by MB)
Correctly write .annot files with duplicate labels (pr/763) (Richard Nemec with CM)
Fix typo in coordinate systems doc (pr/751) (Egor Panfilov, reviewed by CM)
Replace invalid MINC1 test file with fixed file (pr/754) (Dave Allured with CM)
Update Sphinx config to support recent Sphinx/numpydoc (pr/749) (CM, reviewed by PM)
Pacify FutureWarning and DeprecationWarning from h5py, numpy (pr/760) (CM)
Accommodate Python 3.8 deprecation of collections.MutableMapping (pr/762) (Jath Palasubramaniam, reviewed by CM)
Deprecate keep_file_open == 'auto' (pr/761) (CM, reviewed by PM)
Import updates to reduce upstream deprecation warnings (pr/711, pr/705, pr/738) (EL, YOH, reviewed by CM)
Alternative Axis-based interface for manipulating CIFTI-2 headers (pr/641) (Michiel Cottaar, reviewed by Demian Wassermann, CM, SG)
Accept TCK files produced by tools with other delimiter/EOF defaults (pr/720) (Soichi Hayashi, reviewed by CM, MB, MC)
Allow BrainModels or Parcels to contain a single vertex in CIFTI (pr/739) (Michiel Cottaar, reviewed by CM)
Support for NIFTI_XFORM_TEMPLATE_OTHER xform code (pr/743) (CM)
Skip refcheck in ArraySequence construction/extension (pr/719) (Ariel Rokem, reviewed by CM, MC)
Use safe resizing for ArraySequence extension (pr/724) (CM, reviewed by MC)
Fix typo in error message (pr/726) (Jon Haitz Legarreta Gorroño, reviewed by CM)
Support DICOM slice sorting in Python 3 (pr/728) (Samir Reddigari, reviewed by CM)
Correctly reorient dim_info when reorienting NIfTI images (Konstantinos Raktivan, CM, reviewed by CM)
Import updates to reduce upstream deprecation warnings (pr/711, pr/705, pr/738) (EL, YOH, reviewed by CM)
Delay import of nibabel.testing, nose and mock to speed up import (pr/699) (CM)
Increase coverage testing, drop coveralls (pr/722, pr/732) (CM)
Add Zenodo metadata, sorted by commits (pr/732) (CM + others)
Update author listing and copyrights (pr/742) (MB, reviewed by CM)
Restore six dependency (pr/714) (CM, reviewed by Gael Varoquaux, MB)
Restore six dependency (pr/714) (CM, reviewed by Gael Varoquaux, MB)
Remove deprecated calls to numpy.asscalar (pr/686) (CM, reviewed by Gregory R. Lee)
Enable toggling crosshair with Ctrl-x in OrthoSlicer3D viewer (pr/701) (Miguel Estevan Moreno, reviewed by CM)
Read .PAR files corresponding to ADC maps (pr/685) (Gregory R. Lee, reviewed by CM)
Increase maximum number of items read from Siemens CSA format (Igor Solovey, reviewed by CM, MB)
Check boolean dtypes with numpy.issubdtype(..., np.bool_) (pr/707) (Jon Haitz Legarreta Gorroño, reviewed by CM)
Fix small typos in parrec2nii help text (pr/682) (Thomas Roos, reviewed by MB)
Remove deprecated calls to numpy.asscalar (pr/686) (CM, reviewed by Gregory R. Lee)
Update QA directives to accommodate Flake8 3.6 (pr/695) (CM)
Update DOI links to use https://doi.org (pr/703) (Katrin Leinweber, reviewed by CM)
Remove deprecated calls to numpy.fromstring (pr/700) (Ariel Rokem, reviewed by CM, MB)
Drop distutils support, require bz2file for Python 2.7 (pr/700) (CM, reviewed by MB)
Replace mutable bytes hack, disabled in numpy pre-release, with bytearray/readinto strategy (pr/700) (Ariel Rokem, CM, reviewed by CM, MB)
Add Opener.readinto method to read file contents into pre-allocated buffers (pr/700) (Ariel Rokem, reviewed by CM, MB)
nib-diff command line tool for comparing image files (pr/617, pr/672, pr/678) (CC, reviewed by YOH, Pradeep Raamana and CM)
nib-diff command line tool for comparing image files (pr/617, pr/672, pr/678) (CC, reviewed by YOH, Pradeep Raamana and CM)
Speed up reading of numeric arrays in CIFTI2 (pr/655) (Michiel Cottaar, reviewed by CM)
Add ndim property to ArrayProxy and DataobjImage (pr/674) (CM, reviewed by MB)
Deterministic deduction of slice ordering in degenerate cases (pr/647) (YOH, reviewed by CM)
Allow 0ms TR in MGH files (pr/653) (EL, reviewed by CM)
Allow for PPC64 little-endian long doubles (pr/658) (MB, reviewed by CM)
Correct construction of FreeSurfer annotation labels (pr/666) (CM, reviewed by EL, Paul D. McCarthy)
Fix logic for persisting filehandles with indexed-gzip (pr/679) (Paul D. McCarthy, reviewed by CM)
Fix semantic error in coordinate systems documentation (pr/646) (Ariel Rokem, reviewed by CM, MB)
Test on Python 3.7, minor associated fixes (pr/651) (CM, reviewed by Gregory R. Lee, MB)
Nothing published for this version
Set L/R labels in orthoview correctly (pr/564) (CM)
Set L/R labels in orthoview correctly (pr/564) (CM)
Defer use of ufunc / memmap test - allows "freezing" (pr/572) (MB, reviewed by SG)
Fix doctest failures with pre-release numpy (pr/582) (MB, reviewed by CM)
Update documentation around NIfTI qform/sform codes (pr/576) (PM, reviewed by MB, CM) + (pr/580) (Bennet Fauber, reviewed by PM)
Skip precision test on macOS, newer numpy (pr/583) (MB, reviewed by CM)
Simplify AppVeyor script, removing conda (pr/584) (MB, reviewed by CM)
Nothing published for this version
Nothing published for this version
Fix for integer overflow on large images (pr/325) (MB);
Fix for integer overflow on large images (pr/325) (MB);
Fix for Freesurfer nifti files with unusual dimensions (pr/332) (Chris Markiewicz);
Fix typos on benchmarks and tests (pr/336, pr/340, pr/347) (Chris Markiewicz);
Fix Windows install script (pr/339) (MB);
Support for Python 3.5 (pr/363) (MB) and numpy 1.10 (pr/358) (Chris Markiewicz);
Update pydicom imports to permit version 1.0 (pr/379) (Chris Markiewicz);
Workaround for Python 3.5.0 gzip regression (pr/383) (Ben Cipollini).
tripwire.TripWire object now raises subclass of AttributeError when trying to get an attribute, rather than a direct subclass of Exception. This prevents Python 3.5 triggering the tripwire when doing inspection prior to running doctests.
Minor API change for tripwire.TripWire object; code that checked for AttributeError will now also catch TripWireError.
Contributions from Ben Cipollini, Chris Markiewicz, Alexandre Gramfort, Clemens Bauer, github user freec84.
Contributions from Ben Cipollini, Chris Markiewicz, Alexandre Gramfort, Clemens Bauer, github user freec84.
Bugfix release with minor new features;
Added axis parameter to concat_images (pr/298) (Ben Cipollini);
Fix for unsigned integer data types in ECAT images (pr/302) (MB, test data and issue report from Github user freec84);
Added new ECAT and Freesurfer data files to automated testing;
Fix for Freesurfer labels error on early numpies (pr/307) (Alexandre Gramfort);
Fixes for PAR / REC header parsing (pr/312) (MB, issue reporting and test data by Clemens C. C. Bauer);
Workaround for reading Freesurfer ico7 surface files (pr/315) (Chris Markiewicz);
Changed to github pages for doc hosting;
Changed docs to point to neuroimaging@python.org mailing list.
A new API for reading unscaled data from NIfTI and other images, using img.dataobj.get_unscaled(). Deprecate previous way of doing this, which was to…
This release had large contributions from Eric Larson, Brendan Moloney, Nolan Nichols, Basile Pinsard, Chris Johnson and Nikolaas N. Oosterhof.
New feature, bugfix release with minor API breakage;
Minor API breakage: default write of NIfTI / Analyze image data offset value. The data offset is the number of bytes from the beginning of file to skip before reading the image data. Nibabel behavior changed from keeping the value as read from file, to setting the offset to zero on read, and setting the offset when writing the header. The value of the offset will now be the minimum value necessary to make room for the header and any extensions when writing the file. You can override the default offset by setting value explicitly to some value other than zero. To read the original data offset as read from the header, use the offset property of the image dataobj attribute;
Minor API breakage: data scaling in NIfTI / Analyze now set to NaN when reading images. Data scaling refers to the data intercept and slope values in the NIfTI / Analyze header. To read the original data scaling you need to look at the slope and inter properties of the image dataobj attribute. You can set scaling explicitly by setting the slope and intercept values in the header to values other than NaN;
New API for managing image caching; images have an in_memory property that is true if the image data has been loaded into cache, or is already an array in memory; get_data has new keyword argument caching to specify whether the cache should be filled by get_data;
Images now have properties dataobj, affine, header. We will slowly phase out the get_affine and get_header image methods;
The image dataobj can be sliced using an efficient algorithm to avoid reading unnecessary data from disk. This makes it possible to do very efficient reads of single volumes from a time series;
NIfTI2 read / write support;
Read support for MINC2;
Much extended read support for PAR / REC, largely due to work from Eric Larson and Gregory R. Lee on new code, advice and code review. Thanks also to Jeff Stevenson and Bennett Landman for helpful discussion;
parrec2nii script outputs images in LAS voxel orientation, which appears to be necessary for compatibility with FSL dtifit / fslview diffusion analysis pipeline;
Preliminary support for Philips multiframe DICOM images (thanks to Nolan Nichols, Ly Nguyen and Brendan Moloney);
New function to save Freesurfer annotation files (by Github user ohinds);
Method to return MGH format vox2ras_tkr affine (Eric Larson);
A new API for reading unscaled data from NIfTI and other images, using img.dataobj.get_unscaled(). Deprecate previous way of doing this, which was to read data with the read_img_data function;
Fix for bug when replacing NaN values with zero when writing floating point data as integers. If the input floating point data range did not include zero, then NaN would not get written to a value corresponding to zero in the output;
Improvements and bug fixes to image orientation calculation and DICOM wrappers by Brendan Moloney;
Bug fixes writing GIfTI files. We were using a base64 encoding that didn't match the spec, and the wrong field name for the endian code. Thanks to Basile Pinsard and Russ Poldrack for diagnosis and fixes;
Bug fix in freesurfer.read_annot with orig_ids=False when annot contains vertices with no label (Alexandre Gramfort);
More tutorials in the documentation, including introductory tutorial on DICOM, and on coordinate systems;
Lots of code refactoring, including moving to common code-base for Python 2 and Python 3;
New mechanism to add images for tests via git submodules.
Special thanks to Chris Johnson, Brendan Moloney and JB Poline.
Special thanks to Chris Johnson, Brendan Moloney and JB Poline.
New feature and bugfix release
Add ability to write Freesurfer triangle files (Chris Johnson)
Relax threshold for detecting rank deficient affines in orientation detection (JB Poline)
Fix for DICOM slice normal numerical error (issue #137) (Brendan Moloney)
Fix for Python 3 error when writing zero bytes for offset padding
Fix longdouble tests for Debian PPC (thanks to Yaroslav Halchecko for finding and diagnosing these errors)
Bugfix release
Fix longdouble tests for Debian PPC (thanks to Yaroslav Halchecko for finding and diagnosing these errors)
Generalize longdouble tests in the hope of making them more robust
Disable saving of float128 nifti type unless platform has real IEEE binary128 longdouble type.
Particular thanks to Yaroslav Halchecko for fixes and cleanups in this release.
Particular thanks to Yaroslav Halchecko for fixes and cleanups in this release.
Bugfix release
Make compatible with pydicom 0.9.7
Refactor, rename nifti diagnostic script to nib-nifti-dx
Fix a bug causing an error when analyzing affines for orientation, when the affine contained all 0 columns
Add missing dicomfs script to installation list and rename to nib-dicomfs
This release had large contributions from Krish Subramaniam, Alexandre Gramfort, Cindee Madison, Félix C. Morency and Christian Haselgrove.
This release had large contributions from Krish Subramaniam, Alexandre Gramfort, Cindee Madison, Félix C. Morency and Christian Haselgrove.
New feature and bugfix release
Freesurfer format support by Krish Subramaniam and Alexandre Gramfort.
ECAT read write support by Cindee Madison and Félix C. Morency.
A DICOM fuse filesystem by Christian Haselgrove.
Much work on making data scaling on read and write more robust to rounding error and overflow (MB).
Import of nipy functions for working with affine transformation matrices.
Added methods for working with nifti sform and qform fields by Bago Amirbekian and MB, with useful discussion by Brendan Moloney.
Fixes to read / write of RGB analyze images by Bago Amirbekian.
Extensions to concat_images by Yannick Schwartz.
A new nib-ls script to display information about neuroimaging files, and various other useful fixes by Yaroslav Halchenko.
Refactoring of trackvis read / write to allow reading and writing of voxel points and mm points in tracks. Deprecate use of negative voxel sizes; set…
Special thanks to Chris Burns, Jarrod Millman and Yaroslav Halchenko.
New feature release
Python 3.2 support
Substantially enhanced gifti reading support (Stephan Gerhard)
Refactoring of trackvis read / write to allow reading and writing of voxel points and mm points in tracks. Deprecate use of negative voxel sizes; set voxel_order field in trackvis header. Thanks to Chris Filo Gorgolewski for pointing out the problem and Ruopeng Wang in the trackvis forum for clarifying the coordinate system of trackvis files.
Added routine to give approximate array orientation in form such as 'RAS' or 'LPS'
Fix numpy dtype hash errors for numpy 1.2.1
Other bug fixes as for 1.0.2
Make inference of data type more robust to changes in numpy dtype hashing
Bugfix release
Make inference of data type more robust to changes in numpy dtype hashing
Fix incorrect thresholds in quaternion calculation (thanks to Yarik H for pointing this one out)
Make parrec2nii pass over errors more gracefully
More explicit checks for missing or None field in trackvis and other classes - thanks to Marc-Alexandre Cote
Make logging and error level work as expected - thanks to Yarik H
Loading an image does not change qform or sform - thanks to Yarik H
Allow 0 for nifti scaling as for spec - thanks to Yarik H
nifti1.save now correctly saves single or pair images
Fix bugs in tests for data package paths
Bugfix release
Fix bugs in tests for data package paths
Fix leaks of open filehandles when loading images (thanks to Gael Varoquaux for the report)
Skip rw tests for SPM images when scipy not installed
Fix various windows-specific file issues for tests
Fix incorrect reading of byte-swapped trackvis files
Workaround for odd numpy dtype comparisons leading to header errors for some loaded images (thanks to Cindee Madison for the report)
This is the first public release of the NiBabel package.
This is the first public release of the NiBabel package.
NiBabel is a complete rewrite of the PyNifti package in pure python. It was designed to make the code simpler and easier to work with. Like PyNifti, NiBabel has fairly comprehensive NIfTI read and write support.
Extended support for SPM Analyze images, including orientation affines from matlab .mat files.
Basic support for simple MINC 1.0 files (MB). Please let us know if you have MINC files that we don't support well.
Support for reading and writing PAR/REC images (MH)
parrec2nii script to convert PAR/REC images to NIfTI format (MH)
Very preliminary, limited and highly experimental DICOM reading support (MB, Ian Nimmo Smith).
Some functions (nibabel.funcs) for basic image shape changes, including the ability to transform to the image with data closest to the canonical image orientation (first axis left-to-right, second back-to-front, third down-to-up) (MB, Jonathan Taylor)
Gifti format read and write support (preliminary) (Stephen Gerhard)
Added utilities to use nipy-style data packages, by rip then edit of nipy data package code (MB)
Some improvements to release support (Jarrod Millman, MB, Fernando Perez)
Huge downward step in the quality and coverage by the docs, caused by MB, mostly fixed by a lot of good work by MH.
NiBabel will not work with Python < 2.5, and we haven't even tested it with Python 3. We will get to it soon...
Modifications are done by Michael Hanke, if not indicated otherwise. 'Closes' statement IDs refer to the Debian bug tracking system and can be queried by visiting the URL:
http://bugs.debian.org/<bug id>
Your coding agent can read these notes before it upgrades. Set up the MCP server →