# Image Registration Method Displacement 1 Example: Composite transform order

**URL:** https://discourse.itk.org/t/image-registration-method-displacement-1-example-composite-transform-order/3920
**Category:** Beginner Questions
**Created:** [March 2, 2021, 11:47am UTC](https://discourse.itk.org/t/image-registration-method-displacement-1-example-composite-transform-order/3920 "2021-03-02T11:47:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cpicarr1](https://discourse.itk.org/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@cpicarr1](https://discourse.itk.org/u/cpicarr1)
#### Post date: [March 2, 2021, 11:47am UTC](https://discourse.itk.org/t/image-registration-method-displacement-1-example-composite-transform-order/3920/1 "2021-03-02T11:47:37Z")

</div>

Hello,  
Regarding one of the examples on the SimpleITK documentation website: [Image Registration Method Displacement 1 — SimpleITK 2.0rc2 documentation](https://simpleitk.readthedocs.io/en/master/link_ImageRegistrationMethodDisplacement1_docs.html)  
In this example, an affine + displacement registration is done, but at the end, the composition transform is written as:  
`compositeTx = sitk.CompositeTransform([outTx1, displacementTx])`, in which `outTx1` is the affine transform.  
As the sitk.CompositeTransform applies the first added transforms last, shouldn’t it be `compositeTx = sitk.CompositeTransform([displacementTx, outTx1]) `, to apply the affine first (given that we even initialised with the displacement registration with the affine by applying `R.SetMovingInitialTransform(outTx1)`)?  
Thank you in advance for your time and help.

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [March 2, 2021, 7:30pm UTC](https://discourse.itk.org/t/image-registration-method-displacement-1-example-composite-transform-order/3920/2 "2021-03-02T19:30:34Z")

</div>

Hello,

Please see the following documentation on how the transforms are applied to understand the ordering: [Registration Overview — SimpleITK 2.0rc2 documentation](https://simpleitk.readthedocs.io/en/master/registrationOverview.html#transforms-and-image-spaces)

---

<div class="post-metadata">

### Author: ![cpicarr1](https://discourse.itk.org/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@cpicarr1](https://discourse.itk.org/u/cpicarr1)
#### Post date: [March 8, 2021, 10:32am UTC](https://discourse.itk.org/t/image-registration-method-displacement-1-example-composite-transform-order/3920/3 "2021-03-08T10:32:10Z")

</div>

Thank you @blowekamp!
