• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nipy / nibabel / 49
93%

Build:
DEFAULT BRANCH: master
Ran 14 Jan 2014 10:52PM UTC
Jobs 1
Files 128
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
49

push

travis-ci

matthew-brett
Merge pull request #211 from matthew-brett/add-proxy-slicing

MRG: add proxy slicing

Long awaited API to be able to do arbitrary slicing on array proxies from images.

Meaning, you can slice data from images without loading the whole image from disk.

Of course this can save memory, but it can also be much faster. For an
uncompressed nifti image:

In [17]: timeit img = nib.load(fname1); arr = img.dataobj[..., 120]
1000 loops, best of 3: 1.7 ms per loop

In [19]: timeit img = nib.load(fname1); arr = img.get_data()[..., 120]
1 loops, best of 3: 713 ms per loop
For a gzipped image, the savings depend on the position in the file:

In [8]: timeit img = nib.load(fname); arr = img.dataobj[..., 2]
10 loops, best of 3: 30.7 ms per loop

In [7]: timeit img = nib.load(fname); arr = img.get_data()[..., 2]
1 loops, best of 3: 1.32 s per loop

In [12]: timeit img = nib.load(fname); arr = img.dataobj[..., 40]
1 loops, best of 3: 466 ms per loop

In [11]: timeit img = nib.load(fname); arr = img.get_data()[..., 40]
1 loops, best of 3: 1.31 s per loop

In [13]: timeit img = nib.load(fname); arr = img.dataobj[..., 100]
1 loops, best of 3: 1.15 s per loop

In [14]: timeit img = nib.load(fname); arr = img.dataobj[..., 120]
1 loops, best of 3: 1.38 s per loop

13990 of 15469 relevant lines covered (90.44%)

0.9 hits per line

Jobs
ID Job ID Ran Files Coverage
4 49.4 (COVERAGE=--with-coverage) 14 Jan 2014 10:52PM UTC 0
90.44
Travis Job 49.4
Source Files on build 49
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #49
  • c36661f2 on github
  • Prev Build on master (#46)
  • Next Build on master (#50)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc