2.0.0
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 theoffset
property of the imagedataobj
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 theslope
andinter
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 argumentcaching
to
specify whether the cache should be filled byget_data
; - Images now have properties
dataobj
,affine
,header
. We will
slowly phase out theget_affine
andget_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 FSLdtifit
/
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 theread_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
withorig_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.