Releases: nipy/nibabel
5.2.1
Release notes
Bug-fix release in the 5.2.x series.
Enhancements
- Support "flat" ASCII-encoded GIFTI DataArrays (#1298) (PM, reviewed by CM)
Bug fixes
- Tolerate missing
git
when reporting version info (#1286) (CM, reviewed by Yuri Victorovich) - Handle Siemens XA30 derived DWI DICOMs (#1296) (CM, reviewed by YOH and Mathias Goncalves)
Maintenance
- Add tool for generating GitHub-friendly release notes (#1284) (CM)
- Accommodate pytest 8 changes (#1297) (CM)
Full Changelog: 5.2.0...5.2.1
5.2.0
Release notes
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.
New features
- Add generic Pointset and regularly spaced Grid data structures in preparation for coordinate transformation and resampling (#1251) (CM, reviewed by Oscar Esteban)
Enhancements
- Add copy method to ArrayProxy (#1255) (CM, reviewed by Paul McCarthy)
- Permit to_xml to pass keyword arguments to tostring (#1258) (CM)
- Allow user expansion (e.g.,
~/...
) in strings passed to functions that accept paths (#1260) (Reinder Vos de Wael, reviewed by CM) - Expand CIFTI-2 brain structures to permit synonyms (#1256) (CM, reviewed by Mathias Goncalves)
- Annotate SpatialImage as accepting
affine=None
argument (#1253) (Blake Dewey, reviewed by CM) - Warn on invalid MINC2 spacing declarations, treat as missing (#1237) (Peter Suter, reviewed by CM)
- Refactor find_private_section for improved readability and maintainability (#1228) (MB, reviewed by CM)
Bug fixes
- Resolve test failure related to randomly generated invalid case (#1221) (CM)
Documentation
- Remove references to NiPy data packages from documentation (#1275) (Dimitri Papadopoulos, reviewed by CM, MB)
Maintenance
- Quality of life improvements for CI, including color output and OIDC publishing (#1282) (CM)
- Patch for NumPy 2.0 pre-release compatibility (#1250) (Mathieu Scheltienne and EL, reviewed by CM)
- Add spellchecking to tox, CI and pre-commit (#1266) (CM)
- Add py312-dev-x64 environment to Tox to test NumPy 2.0 pre-release compatibility (#1267) (CM, reviewed by EL)
- Resurrect tox configuration to cover development workflows and CI checks (#1262) (CM)
- Updates for Python 3.12 support (#1247, #1261, #1273) (CM)
- Remove uses of deprecated
numpy.compat.py3k
module (#1243) (Eric Larson, reviewed by CM) - Various fixes for typos and style issues detected by Codespell, pyupgrade and refurb (#1263, #1269, #1270, #1271, #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 (#1234) (CM)
- Resolve CodeCov submission failures (#1224) (CM)
- Link to logo with full URL to avoid broken links in PyPI (#1218) (CM, reviewed by Zvi Baratz)
API changes and deprecations
- The nibabel.pydicom_compat module is deprecated and will be removed in NiBabel 7.0. (#1280)
- The int_to_float and as_int functions are no longer needed to work around NumPy deficiencies and have been deprecated (#1272) (CM, reviewed by EL)
New Contributors
- @petsuter made their first contribution in #1237
- @blakedewey made their first contribution in #1253
- @ReinderVosDeWael made their first contribution in #1260
- @mscheltienne made their first contribution in #1250
Full Changelog: 5.1.0...5.2.0
5.1.0
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.
Enhancements
- Make
imagestats
available withimport nibabel
(pr/1208) (Fabian Perez, reviewed by CM) - Use symmetric threshold for identifying unit quaternions on qform calculations (pr/1182) (CM, reviewed by MB)
- Type annotations for
nibabel.loadsave
(pr/1213) andnibabel.spatialimages.SpatialImage
APIs (pr/1179),nibabel.deprecated
,nibabel.deprecator
,nibabel.onetime
andnibabel.optpkg
modules (pr/1188),nibabel.volumeutils
(pr/1189),nibabel.filename_parser
andnibabel.openers
(pr/1197) (CM, reviewed by Zvi Baratz)
Bug fixes
- Require explicit overrides to write GIFTI files that contain data arrays with data types not permitted by the GIFTI standard (pr/1199) (CM, reviewed by Alexis Thual)
Maintenance
- Move compression detection logic into a private
nibabel._compression
module, resolving unexpected errors from pyzstd. (pr/1212) (CM) - Improved consistency of docstring formatting (pr/1200) (Zvi Baratz, reviewed by CM)
- Modernized README text (pr/1195) (Zvi Baratz, reviewed by CM)
- Updated README badges to include package distributions (pr/1192) (Horea Christian, reviewed by CM)
- Removed all dependencies on distutils and setuptools (pr/1190) (CM, reviewed by Zvi Baratz)
- Add a
_version.pyi
stub to allow mypy to run without building nibabel (pr/1210) (CM)
New Contributors
- @TheChymera made their first contribution in #1192
- @Factral made their first contribution in #1208
Full Changelog: 5.0.1...5.1.0
5.0.1
Bug-fix 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).
References like "pr/298" refer to github pull request numbers.
Bug fixes
- Support ragged voxel arrays in
ParcelsAxis
(pr/1194) (Michiel Cottaar, reviewed by CM) - Return to cwd on exception in
InTemporaryDirectory
(pr/1184) (CM)
Maintenance
- Add
py.typed
to module root to enable use of types in downstream projects (pr/1196) (CM, reviewed by Fernando Pérez-Garcia) - Cache git-archive separately from Python packages in GitHub Actions (pr/1186) (CM, reviewed by Zvi Baratz)
5.0.0
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 hasto_stream()
andfrom_stream()
methods to read/write streams implementing theio.IOBase
interface. Afrom_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
topyproject.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 toNifti1Image
without a header or dtype argument will raise aValueError
. (pr/1173) (CM) -
tmpdirs.TemporaryDirectory
is deprecated in favor oftempfile.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
ExpiredDeprecationError
snibabel.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 beAttributeError
\s.
4.0.0
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.
4.0.0 (Saturday 18 June 2022)
New feature release in the 4.0.x series.
New features
- 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 foruint8
.'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 toCifti2Image
(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)
Enhancements
- 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)
Bug fixes
- 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)
Maintenance
- 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)
API changes and deprecations
- Writing NIfTIs with 64-bit integer dtypes is getting harder.
Passing(u)int64
arrays toNifti1Image
and subclasses will warn unless
aheader
ordtype
option is passed; in the future this will become an
error.
Additionally, passingint
or'int'
toset_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
(useMinc1Image
)nibabel.minc1.MincFile
(useMinc1File
)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)
4.0.0rc0
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.
4.0.0 (To be determined)
New feature release in the 4.0.x series.
New features
- 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 foruint8
.'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 toCifti2Image
(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)
Enhancements
- 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)
Bug fixes
- 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)
Maintenance
- 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)
API changes and deprecations
- Writing NIfTIs with 64-bit integer dtypes is getting harder.
Passing(u)int64
arrays toNifti1Image
and subclasses will warn unless
aheader
ordtype
option is passed; in the future this will become an
error.
Additionally, passingint
or'int'
toset_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
(useMinc1Image
)nibabel.minc1.MincFile
(useMinc1File
)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)
3.2.2
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.
3.2.2 (Monday 7 February 2022)
Bug fix release in the 3.2.x series.
Bug fixes
- 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)
Maintenance
- 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)
3.2.1
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.
3.2.1 (Saturday 28 November 2020)
Bug fix release in the 3.2.x series.
Maintenance
- 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)
3.2.0
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.
3.2.0 (Tuesday 20 October 2020)
New feature release in the 3.2.x series.
New features
nib-stats
CLI tool to expose newnibabel.imagestats
API. Initial implementation of volume calculations, a lafslstats -V
. (pr/952) (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)
Enhancements
- 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 forCifti2Image
(pr/938) (CM, reviewed by Mathias Goncalves) - Clean up of DICOM documentation (pr/910) (Jonathan Daniel, reviewed by MB)
Bug fixes
- 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)
Maintenance
- 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)
API changes and deprecations
- Drop support for Numpy < 1.13 (pr/922) (CM)
- Warn on use of
onetime.setattr_on_read
, which has been a deprecated alias ofauto_attr
(pr/948) (CM, reviewed by Ariel Rokem)