2.1.0
New feature release for the 2.1 series.
Most work on NiBabel so far has been by Matthew Brett (MB), Michael Hanke (MH)
Ben Cipollini (BC), Marc-Alexandre Côté (MC), Chris Markiewicz (CM), Stephan
Gerhard (SG) and Eric Larson (EL).
References like "pr/298" refer to github pull request numbers.
New features
- New API for managing streamlines and their different file formats. This
adds a new modulenibabel.streamlinesthat will eventually deprecate
the current trackvis reader found innibabel.trackvis(pr/391) (MC,
reviewed by Jean-Christophe Houde, Bago Amirbekian, Eleftherios
Garyfallidis, Samuel St-Jean, MB); - A prototype image viewer using matplotlib (pr/404) (EL, based on a
proto-prototype by Paul Ivanov) (Reviewed by Gregory R. Lee, MB); - Functions for image resampling and smoothing using scipy ndimage (pr/255)
(MB, reviewed by EL, BC); - Add ability to write FreeSurfer morphology data (pr/414) (CM, BC, reviewed
by BC); - Read and write support for DICOM tags in NIfTI Extended Header using
pydicom (pr/296) (Eric Kastman).
Enhancements
- Extensions to FreeSurfer module to fix reading and writing of FreeSurfer
geometry data (pr/460) (Alexandre Gramfort, Jaakko Leppäkangas, reviewed
by EL, CM, MB); - Various improvements to PAR / REC handling by Gregory R. Lee: supporting
multiple TR values (pr/429); output of volume labels (pr/427); fix for
some diffusion files (pr/426); option for more sophisticated sorting of
volumes (pr/409); - Original trackvis reader will now allow final streamline to have fewer
points than the number declared in the header, withstrict=False
argument toreadfunction; - Helper function to return voxel sizes from an affine matrix (pr/413);
- Fixes to DICOM multiframe reading to avoid assumptions on the position of
the multiframe index (pr/439) (Eric M. Baker); - More robust handling of "CSA" private information in DICOM files (pr/393)
(Brendan Moloney); - More explicit error when trying to read image from non-existent file
(pr/455) (Ariel Rokem); - Extension to
nib-lscommand to show image statistics (pr/437) and other
header files (pr/348) (Yarik Halchenko).
Bug fixes
- Fixes to rotation order to generate affine matrices of PAR / REC files (MB,
Gregory R Lee).
Maintenance
- Dropped support for Pythons 2.6 and 3.2;
- Comprehensive refactor and generalization of surface / GIFTI file support
with improved API and extended tests (pr/352-355, pr/360, pr/365, pr/403)
(BC, reviewed by CM, MB); - Refactor of image classes (pr/328, pr/329) (BC, reviewed by CM);
- Better Appveyor testing on new Python versions (pr/446) (Ariel Rokem);
- Fix shebang lines in scripts for correct install into virtualenvs via pip
(pr/434); - Various fixes for numpy, matplotlib, and PIL / Pillow compatibility (CM,
Ariel Rokem, MB); - Improved test framework for warnings (pr/345) (BC, reviewed by CM, MB);
- New decorator to specify start and end versions for deprecation warnings
(MB, reviewed by CM); - Write qform affine matrix to NIfTI images output by
parrec2nii(pr/478)
(Jasper J.F. van den Bosch, reviewed by Gregory R. Lee, MB).
API changes and deprecations
- Minor API breakage in original (rather than new) trackvis reader. We are now
raising aDataErrorif there are too few streamlines in the file,
instead of aHeaderError. We are raising aDataErrorif the track
is truncated whenstrict=True(the default), rather than aTypeError
when trying to create the points array. - Change sform code that
parrec2niiscript writes to NIfTI images; change
from 2 ("aligned") to 1 ("scanner"); - Deprecation of
get_header,get_affinemethod of image objects for
removal in version 4.0; - Removed broken
from_filespecmethod from image objects, and deprecated
from_filespecmethod of ECAT image objects for removal in 4.0; - Deprecation of
class_mapinstance inimageclassesmodule in favor of
new image class attributes, for removal in 4.0; - Deprecation of
ext_mapinstance inimageclassesmodule in favor of
new image loading API, for removal in 4.0; - Deprecation of
Headerclass in favor ofSpatialHeader, for removal
in 4.0; - Deprecation of
BinOpenerclass in favor of more genericOpener
class, for removal in 4.0; - Deprecation of
GiftiMetadatamethodsget_metadataandget_rgba;
GiftiDataArraymethodsget_metadata,get_labeltable,
set_labeltable;GiftiImagemethodsget_meta,set_meta. All
these deprecated in favor of corresponding properties, for removal in 4.0; - Deprecation of
giftiioreadandwritefunctions in favor of
nibabelloadandsavefunctions, for removal in 4.0; - Deprecation of
gifti.data_tagfunction, for removal in 4.0; - Deprecation of write-access to
GiftiDataArray.num_dim, and new error
when trying to set invalid values fornum_dim. We will remove
write-access in 4.0; - Deprecation of
GiftiDataArray.from_arrayin favor ofGiftiDataArray
constructor, for removal in 4.0; - Deprecation of
GiftiDataArrayto_xml_open, to_xml_closemethods in
favor ofto_xmlmethod, for removal in 4.0; - Deprecation of
parse_gifti_fast.Outputterclass in favor of
GiftiImageParser, for removal in 4.0; - Deprecation of
parse_gifti_fast.parse_gifti_filefunction in favor of
GiftiImageParser.parsemethod, for removal in 4.0; - Deprecation of
loadsavefunctionsguessed_image_typeand
which_analyze_type, in favor of new API where each image class tests the
file for compatibility during load, for removal in 4.0;