# Extracting displacement fields from rigid registration

**URL:** https://discourse.itk.org/t/extracting-displacement-fields-from-rigid-registration/4834
**Category:** Beginner Questions
**Tags:** registration, python, itkv5
**Created:** [February 25, 2022, 11:03pm UTC](https://discourse.itk.org/t/extracting-displacement-fields-from-rigid-registration/4834 "2022-02-25T23:03:39Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![edgar](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@edgar](https://discourse.itk.org/u/edgar)
#### Post date: [April 12, 2022, 7:48pm UTC](https://discourse.itk.org/t/extracting-displacement-fields-from-rigid-registration/4834/7 "2022-04-12T19:48:35Z")

</div>

Hi! I’m back 🙂 .

I’ve got a little step forward:

```
displ_filt = itk.TransformToDisplacementFieldFilter[itk.Image[itk.Vector[itk.F,3],3], itk.D].New()

```

In the [example](https://itk.org/ITKExamples/src/Filtering/ImageGrid/WarpAnImageUsingADeformationField/Documentation.html) which is linked above, the deformation field is provided as an input (`deformationField = fieldReader.GetOutput()`). I already tried to look into the [documentation](https://itk.org/Doxygen/html/classitk_1_1TransformToDisplacementFieldFilter.html) mentioned by @matt.mccormick [over here](https://discourse.itk.org/t/extracting-vectors-from-displacement-field/417/2), and with `help(displ_filt)`. Right now, I am unsure of how to get the deformation field from the [registration](https://discourse.itk.org/t/3d-image-registration-with-python-and-without-simpleitk/4773/2) or [`movingInitialTransform`](https://discourse.itk.org/uploads/short-url/v2jPUbpGc3HXfmMHad1B46sER0o.py). Any tips? Thank you in advance.

It’s nice to be back.

---

_[View the full topic](https://discourse.itk.org/t/extracting-displacement-fields-from-rigid-registration/4834)._
