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.streamlines
that 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 toread
function; - 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-ls
command 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 aDataError
if there are too few streamlines in the file,
instead of aHeaderError
. We are raising aDataError
if the track
is truncated whenstrict=True
(the default), rather than aTypeError
when trying to create the points array. - Change sform code that
parrec2nii
script writes to NIfTI images; change
from 2 ("aligned") to 1 ("scanner"); - Deprecation of
get_header
,get_affine
method of image objects for
removal in version 4.0; - Removed broken
from_filespec
method from image objects, and deprecated
from_filespec
method of ECAT image objects for removal in 4.0; - Deprecation of
class_map
instance inimageclasses
module in favor of
new image class attributes, for removal in 4.0; - Deprecation of
ext_map
instance inimageclasses
module in favor of
new image loading API, for removal in 4.0; - Deprecation of
Header
class in favor ofSpatialHeader
, for removal
in 4.0; - Deprecation of
BinOpener
class in favor of more genericOpener
class, for removal in 4.0; - Deprecation of
GiftiMetadata
methodsget_metadata
andget_rgba
;
GiftiDataArray
methodsget_metadata
,get_labeltable
,
set_labeltable
;GiftiImage
methodsget_meta
,set_meta
. All
these deprecated in favor of corresponding properties, for removal in 4.0; - Deprecation of
giftiio
read
andwrite
functions in favor of
nibabelload
andsave
functions, for removal in 4.0; - Deprecation of
gifti.data_tag
function, 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_array
in favor ofGiftiDataArray
constructor, for removal in 4.0; - Deprecation of
GiftiDataArray
to_xml_open, to_xml_close
methods in
favor ofto_xml
method, for removal in 4.0; - Deprecation of
parse_gifti_fast.Outputter
class in favor of
GiftiImageParser
, for removal in 4.0; - Deprecation of
parse_gifti_fast.parse_gifti_file
function in favor of
GiftiImageParser.parse
method, for removal in 4.0; - Deprecation of
loadsave
functionsguessed_image_type
and
which_analyze_type
, in favor of new API where each image class tests the
file for compatibility during load, for removal in 4.0;