Skip to content

About

Representation of spatial deformations

Resources

Stars

8 stars

Watchers

5 watching

Forks

Latest commit

 

History

109 Commits

Folders and files

Repository files navigation

RegisterDeformation

Build Status Coverage Aqua QA

This package implements deformations (a.k.a., diffeomorphisms) for warping space. A deformation ϕ(x) = x + u(x) maps every point x to a displaced location, enabling image warping and spatial registration.

Installation

This package is registered in the HolyLab registry. Add the registry once, then install normally:

using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/HolyLab/HolyLabRegistry"))
Pkg.add("RegisterDeformation")

Quick start

using RegisterDeformation

# Create a coarse 5×5 displacement grid over a 512×768 image domain
gridsize = (5, 5)
nodes = (range(1, 512, length=5), range(1, 768, length=5))
u = zeros(2, gridsize...)          # 2D displacements, initially zero
ϕ = GridDeformation(u, nodes)

# Prepare for evaluation at arbitrary positions
ϕi = interpolate(ϕ)
ϕi(100.0, 200.0)                   # returns the displaced position

# Warp an image
using TestImages
img = testimage("lighthouse")
imgw = warp(img, ϕ)

See the documentation for a full overview.

This package was split from BlockRegistration.

About

Representation of spatial deformations

Resources

Stars

8 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages