Fixing slicing issues detailed in #719. The behavior of slicing should now be consistent with what you get on a numpy array, except that it returns an antsImage for slices with dimensions >= 2.
When slicing by indices, direction matrices are collapsed to identity. Users need to call the slice_image function to control that.
I added support for negative indices, so you can do something like im[:,:,0:-1] and it behaves as numpy does.
coverage: 85.341% (+0.003%) from 85.338%
when pulling b5380b4c313faef84c1917983ea4a9106638f335 on fix_slicing
into 88437eb4b8a9120df32b487216139eb35d379c74 on master.
Fixing slicing issues detailed in #719. The behavior of slicing should now be consistent with what you get on a numpy array, except that it returns an antsImage for slices with dimensions >= 2.
When slicing by indices, direction matrices are collapsed to identity. Users need to call the slice_image function to control that.
I added support for negative indices, so you can do something like
im[:,:,0:-1]
and it behaves as numpy does.