# imregdemons

Estimate displacement field that aligns two 2-D or 3-D images

## Syntax

## Description

`[`

estimates the displacement field `D`

,`moving_reg`

]
= imregdemons(`moving`

,`fixed`

)`D`

that aligns the image to be
registered, `moving`

, with the reference image,
`fixed`

. The displacement vectors at each pixel location map locations
from the `fixed`

image grid to a corresponding location in the
`moving`

image. `moving_reg`

is a warped version of
the `moving`

image that is warped according to the displacement field
`D`

and resampled using linear interpolation.

`[`

specifies the number of iterations to be computed. This function does not use a convergence
criterion and therefore is always guaranteed to run for the specified or default number of
iterations. `D`

,`moving_reg`

] = imregdemons(`moving`

,`fixed`

,`N`

)

`[`

registers the moving image using name-value pairs to control aspects
of weight computation.`D`

,`moving_reg`

] = imregdemons(___,`Name,Value`

)

## Examples

## Input Arguments

## Output Arguments

## References

[1] Thirion, J.-P. "Image matching as a diffusion process: an analogy with Maxwell’s
demons". *Medical Image Analysis*. Vol. 2, Number 3, 1998, pp.
243–260.

[2] Vercauteren, T., X. Pennec, A. Perchant, N. Ayache, "Diffeomorphic Demons:
Efficient Non-parametric Image Registration", *NeuroImage*. Vol. 45,
Number 1, Supplement 1, March 2009, pp. 61–72.

## Extended Capabilities

## Version History

**Introduced in R2014b**