Affine slicer.
Project description
fineslice
fineslice is a lightweight sampler for 3D-affine transformed images (commonly used in neuroscience) implemented in
pure Python + NumPy.
It does not make any assumptions about the data. Pass any image texture and affine matrix directly into it.
Features
- Precision sampling (no need to 're-sample' and loose precision)
- Automatically finds optimal dimensions
- Only depends on NumPy
Usage with nibabel
For the best performance directly pass in the nibabel data object as a texture:
import nibabel as nib
import fineslice as fine
img = nib.load('my_image.nii.gz')
out = fine.sample_0d(
texture=img.dataobj,
affine=img.affine,
out_position=(0, 0, 0)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fineslice-0.0.3.tar.gz
(10.7 kB
view hashes)
Built Distribution
fineslice-0.0.3-py3-none-any.whl
(13.8 kB
view hashes)
Close
Hashes for fineslice-0.0.3-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | c613a18151b7e55d1d1479431b81db2e60290e769793519c4b318e3e569d1f1b |
|
| MD5 | 728d37ddd6af4e315e680c4819e4cbc0 |
|
| BLAKE2b-256 | fb02d4735d73b4cb572a2902c2e28b1f7b425d1681645b950c87809aa76e7a21 |