# Is it possible to apply a fraction of the transformation that obtained from the registration ?! (Elastix, and Transform)

**URL:** https://discourse.itk.org/t/is-it-possible-to-apply-a-fraction-of-the-transformation-that-obtained-from-the-registration-elastix-and-transform/4591
**Category:** Uncategorized
**Tags:** registration, elastix
**Created:** [November 18, 2021, 12:17pm UTC](https://discourse.itk.org/t/is-it-possible-to-apply-a-fraction-of-the-transformation-that-obtained-from-the-registration-elastix-and-transform/4591 "2021-11-18T12:17:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alsurayhi](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@Alsurayhi](https://discourse.itk.org/u/Alsurayhi)
#### Post date: [November 18, 2021, 12:17pm UTC](https://discourse.itk.org/t/is-it-possible-to-apply-a-fraction-of-the-transformation-that-obtained-from-the-registration-elastix-and-transform/4591/1 "2021-11-18T12:17:11Z")

</div>

I have lung CT data. I apply a deformable registration to align the inspiration scan to the expiration scan.  
I got the registered image and the transformationParamters. I used (transformix -def all) to get the deformation field which is stored as a vector where each voxel contains the displacement vector Tµ(x) − x in physical coordinates.

My question is : can we apply a fraction of the deformation, (i.e 1/5 of the deformation instead of the full deformation)

For example, a voxel x is moved by (10, 20, 6) mm in x, y, and z direction. I want that voxel to move by (5,10,3) mm only.  
I hope there is away to edit the transformationParameter and/or the deformation field to achieve that.

Thanks in advance

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 18, 2021, 2:57pm UTC](https://discourse.itk.org/t/is-it-possible-to-apply-a-fraction-of-the-transformation-that-obtained-from-the-registration-elastix-and-transform/4591/2 "2021-11-18T14:57:58Z")

</div>

[Multiplying](https://itk.org/Doxygen/html/classitk_1_1MultiplyImageFilter.html) the deformation field with a scalar of `0.5` should accomplish that.

---

<div class="post-metadata">

### Author: ![Alsurayhi](https://discourse.itk.org/letter_avatar_proxy/v4/letter/a/ccd318/32.png) [@Alsurayhi](https://discourse.itk.org/u/Alsurayhi)
#### Post date: [November 18, 2021, 4:59pm UTC](https://discourse.itk.org/t/is-it-possible-to-apply-a-fraction-of-the-transformation-that-obtained-from-the-registration-elastix-and-transform/4591/3 "2021-11-18T16:59:29Z")

</div>

Thanks Dzenan  
But, how can I apply this deformation after multiplication to my input image?

I know that _transformix_ can take the _transformationParameters_ to transform an input image.  
Is there any way to edit the _transformationParameters_ itself to apply a fraction of the deformation to the input image?!

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [November 18, 2021, 7:25pm UTC](https://discourse.itk.org/t/is-it-possible-to-apply-a-fraction-of-the-transformation-that-obtained-from-the-registration-elastix-and-transform/4591/4 "2021-11-18T19:25:05Z")

</div>

@Niels_Dekker might know. If no one responds here, ask at [elastix GoogleGroup](https://groups.google.com/g/elastix-imageregistration).
