fixed bug in resampling for unsigned type images
update docstring for cubic spline resampling pyx function
additional tests for resampling
testing the fix
BF: fixed the example to make it work in all circumstances
ENH: rewrote the line of code for confidence intervals to make the code simpler
COSMIT: improved the example (figures + removed unnecessay lines)
make it possible to input slice_order=None to FmriRealign4d
small edit
add test for slice_order=None in FmriRealign4d object
account for PR review comments
Merge pull request #229 from matthew-brett/glm-input-tests

WIP : working on GLM tests

The FMRI glm has a nice doctest, but it depends on having the example data package.

I added a decorator to allow us to skip doctests - taken from ipython - and applied it to the glm doctest so the doctest only runs if we have the example data - when using the nipnost script for testing.
BF: fix for python 2.5 and windows failures

Missing future import of with_statement.
Failed deletion of temporary files in windows.
BF: fix WindowsError on attempted file deletion

Windows raised an error, apparently because of undeleted objects with
references to temporary files.
account for additional PR feedback
cosmit: added some comments in the roi_and_glm script to help the motivated readers
BF: move scripts to use nibabel not imageformats

Scripts were using outdated imageformats import, now failing.
Merge pull request #232 from alexis-roche/fix-issue-228

ENH: Make it possible to input slice_order=None to FmriRealign4d

This should fix issue #228.
Merge pull request #227 from alexis-roche/fix-resampling-bug

BF: fixed bug in resampling for unsigned type images

This branch fixes a bug in the resample function from nipy.algorithms.registration, which returns an image with same dtype as the input image, meaning that any interpolated value needs be converted to the closest value according to the dtype. The conversion was not done properly for images encoded in unsigned integer types as negative values (which can arise here and there due to cubic spline interpolation) would be converted using a simple cast in C. This has been fixed by checking dtype.kind and forcing negative values to zero whenever dtype.kind=='u'.
Merge pull request #231 from bthirion/fix_roi-glm_example

Fix roi glm example

This PR solves both issue #224 and a random failure of the example.