Skip to content

5.0.0

Compare
Choose a tag to compare
@effigies effigies released this 09 Jan 16:08
· 457 commits to master since this release

DOI

New feature release in the 5.0.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).

New features

  • SerializableImage now has to_stream() and from_stream() methods to read/write streams implementing the io.IOBase interface. A from_url() method enables loading images from URLs. (pr/1129) (CM, reviewed by MB)
  • TrkFile supports TRKv3, an undocumented but generally compatible variant of TRKv2. (pr/1125) (CM)

Enhancements

  • Support multiline header fields in TCKFile (pr/1175) (CM, reviewed by Matt Cieslak)
  • Make layout order an initialization parameter of ArrayProxy (pr/1131) (CM, reviewed by MB)
  • Initial support for type annotations. (pr/1115, pr/1178) (CM, reviewed by Zvi Baratz)

Bug fixes

  • 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)

Maintenance

  • 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)

API changes and deprecations

  • Passing an int64 array to Nifti1Image without a header or dtype argument will raise a ValueError. (pr/1173) (CM)

  • 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. ExpiredDeprecationError\s will now be AttributeError\s.