# Compute TRE after image registration for 4DCT lung images

**URL:** <https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558>\
**Category:** Uncategorized\
**Tags:** 4dct-lung, tre, simpleitk, registration\
**Created:** [December 8, 2022, 2:08pm UTC](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558 "2022-12-08T14:08:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VHK](https://discourse.itk.org/user_avatar/discourse.itk.org/vhk/32/3136_2.png) [@VHK](https://discourse.itk.org/u/VHK)\
**Post date:** [December 8, 2022, 2:08pm UTC](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558/1 "2022-12-08T14:08:49Z")

</div>

Hello,

I am doing a deformable image registration for 4DCT lung images. I want to evaluate the registration accuracy by calculating the TRE in SITK. I did Elastix registration in 3D-Slicer and got the transformation as displacement field.

The visualization results show a successful registration, however, TRE after registration is increased!

I greatly appreciate your help.  
Thanks,  
Vahdaneh

---

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)\
**Post date:** [December 8, 2022, 6:14pm UTC](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558/2 "2022-12-08T18:14:54Z")

</div>

What are the target points that you compute TRE from? How do you compute the TRE? Have you checked that you applied the transform to the points correctly (do they visually look good - i.e., move with the image as expected)?

---

<div class="post-metadata">

**Author:** ![VHK](https://discourse.itk.org/user_avatar/discourse.itk.org/vhk/32/3136_2.png) [@VHK](https://discourse.itk.org/u/VHK)\
**Post date:** [January 17, 2023, 1:49pm UTC](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558/3 "2023-01-17T13:49:05Z")

</div>

Dear @lassoan,

I use the DIRLab 4DCT dataset, containing coordinate information for the reference landmarks on the extreme phase images (T00 and T50).

[https://med.emory.edu/departments/radiation-oncology/research-laboratories/deformable-image-registration/downloads-and-reference-data/4dct.html](https://med.emory.edu/departments/radiation-oncology/research-laboratories/deformable-image-registration/downloads-and-reference-data/4dct.html)

I compute TRE via SITK, `utilities.target_registration_errors` .

I could visualize the DVF and it looks good. However, the vector lengths of the displacement field are surprisingly small, compared to the average distance for the landmarks.

---

<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:** [January 17, 2023, 2:26pm UTC](https://discourse.itk.org/t/compute-tre-after-image-registration-for-4dct-lung-images/5558/4 "2023-01-17T14:26:46Z")

</div>

You might be using a composite transform (affine + DVF) for the registration. If you only use DVF during evaluation, it is not surprising that TRE is worse. This might not be the problem, but it is worth checking.
