SplineOps#
Continuous spline models for precise interpolation, antialiased resizing, and derivatives.
From samples to continuous models
Build a continuous cubic spline from discrete samples.
Resize with antialiasing, then apply an affine rotation.
Measure local changes with spline-derived gradients.
One synthetic 2-D field, shown as height maps from actual SplineOps outputs. White dots mark input samples; gradient magnitude uses its own display scale.
SplineOps turns samples on regular grids into continuous spline models. Evaluate between samples, resize with projection-based antialiasing, apply geometric transforms, and compute derivatives in N dimensions. Explicit coordinate and boundary conventions make results reproducible; reusable plans accelerate repeated resizing with the same geometry.
Start here#
import numpy as np
from splineops import resize
volume = np.random.default_rng(0).random((64, 192, 192), dtype=np.float32)
coarse = resize(
volume,
output_size=(32, 96, 96),
method="cubic-antialiasing",
)
The antialiasing methods project the input spline onto a coarser spline space instead of treating downsampling as interpolation alone. Continue with the Five-minute quickstart, then use the Volume downsampling tutorial for a batched 3-D workflow.
Choose SplineOps when#
continuous-valued 2-D or 3-D NumPy data must be downsampled;
coordinate, boundary, and output-shape semantics must be explicit;
aliasing matters; or
many arrays share one resize geometry.
Choose another tool when differentiable GPU execution or automatic physical-space image metadata is required. For ordinary display-image scaling, OpenCV or Pillow may be simpler. Categorical labels normally require nearest-neighbour rather than spline-projection semantics.
Release status#
Module |
Status |
Public position |
|---|---|---|
Resize and |
Stable |
Native N-D interpolation and projection antialiasing with a Python reference path. |
|
Stable CPU |
Continuous tensor-product models evaluated at arbitrary coordinates. |
Affine, differentials, smoothing, regression, and multiscale |
Stable CPU |
Documented operators with independent numerical references and cross-platform tests. See API stability and support for exact support. |
SplineOps does not claim to be the fastest generic 2-D resizer. Its strongest position is continuous spline models, N-D projection antialiasing, explicit coordinate conventions, and reusable fixed-geometry execution. See Performance evidence for measured wins, losses, and limitations.
The current flagship is the 3-D microvessel quality-at-speed validation: on 18 held-out expert-labelled 3-D microscopy patches, SplineOps passed a predeclared narrow quality-and-speed superiority rule against named SciPy, scikit-image, and PyTorch pipelines. It is a preprocessing result, not segmentation or universal resampling superiority.
Explore the package#
Choose interpolation, geometry, derivatives, smoothing, or multiscale tools.
Browse the executable gallery by module or complete workflow.
Compare accuracy, speed, and memory on reproducible scientific workloads.
Research lineage#
SplineOps modernizes spline methods developed across the Biomedical Imaging Group at EPFL and its collaborators. Method citations, implementation history, and source provenance are recorded in Method and source provenance.
These two artworks from the original SplineOps homepage celebrate those roots.
Explore the Biomedical Imaging Group’s art gallery for the original collection.