Skip to content

HolyLab/RegisterDeformation.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

106 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages