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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fineslice-0.0.3.tar.gz.
File metadata
- Download URL: fineslice-0.0.3.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ccd5ffecf7a0b188be1542de803e55419d2a1d56138480ae81fb645acceb781
|
|
| MD5 |
aa0f926f15c287610844d35af0b5fb79
|
|
| BLAKE2b-256 |
b543b98fdf73c9d954085bb6ee533db2589c23926fab830fbeba3d135e25db6a
|
File details
Details for the file fineslice-0.0.3-py3-none-any.whl.
File metadata
- Download URL: fineslice-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c613a18151b7e55d1d1479431b81db2e60290e769793519c4b318e3e569d1f1b
|
|
| MD5 |
728d37ddd6af4e315e680c4819e4cbc0
|
|
| BLAKE2b-256 |
fb02d4735d73b4cb572a2902c2e28b1f7b425d1681645b950c87809aa76e7a21
|