Skip to content

Support B-spline transforms in Atlas.resample_like #229

Description

@sdiebolt

confusius.registration.resample_like accepts both affine (numpy.ndarray) and B-spline (xarray.DataArray) transforms, but the wrapper Atlas.resample_like only accepts an affine matrix (src/confusius/atlas/atlas.py:513-520, typed npt.NDArray[np.float64]).

This blocks users who registered an atlas with register_volume(transform="bspline") from resampling the atlas with the resulting transform. The docstring explicitly states that Atlas.resample_like is meant to mirror confusius.registration.resample_like, so the asymmetry is unintentional.

Meshes returned by get_mesh should follow the same deformation as the volume to stay useful as overlays — meaning the affine assumption baked into the mesh-to-physical update (src/confusius/atlas/atlas.py:595) needs to be lifted in the process.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions