# TwoProjectionRegistration - 2D 3D registration

**URL:** https://discourse.itk.org/t/twoprojectionregistration-2d-3d-registration/1972
**Category:** Beginner Questions
**Created:** [June 17, 2019, 2:04pm UTC](https://discourse.itk.org/t/twoprojectionregistration-2d-3d-registration/1972 "2019-06-17T14:04:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Gabriele\_Belotti](https://discourse.itk.org/user_avatar/discourse.itk.org/gabriele_belotti/32/825_2.png) [@Gabriele\_Belotti](https://discourse.itk.org/u/Gabriele_Belotti)
#### Post date: [June 17, 2019, 2:04pm UTC](https://discourse.itk.org/t/twoprojectionregistration-2d-3d-registration/1972/1 "2019-06-17T14:04:08Z")

</div>

Dear all,

I’m testing this particular module to evaluate a 2D/3D registration context.  
I was able to obtain DRRs using Siddon-Jacobs ray tracing method (starting point is an FDK of POPI model) and as a proof of concept I fed two of these resulting projections (first at the correct angles and centering, then at small tilted angles with added displacement to the CT volume center).  
What I noticed is that the computation of a single step in the registration is incredibly slow even in the case where the initial transform is already at the correct position (around 60”).  
I think the long computation times are possibly caused by metric calculation on the 2 Projections vs the DRRs generated from the volume by the interpolators (Siddon-Jacobs), but I cannot verify this assumption since I can only observe a full registration step.

Is there a way to speed up the process? Unfortunately the custom classes that were implemented in this module do not come with many useful tools such as a Sampling Strategy.

Thanks to anyone contributing

NB: I’m reposting from the old mailing list where Gordian replied suggesting me to use a CUDA based forward projector such as the one included in RTK.  
I’m looking into this but the real issue is that the Siddon-Jacobs class in the original implementation is an image function exploited as Interpolator while rtkCudaForwardProjectionImageFilter.h defines an image filter

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [June 29, 2019, 6:07pm UTC](https://discourse.itk.org/t/twoprojectionregistration-2d-3d-registration/1972/2 "2019-06-29T18:07:44Z")

</div>

> [@Gabriele\_Belotti](#):
>
> NB: I’m reposting from the old mailing list where Gordian replied suggesting me to use a CUDA based forward projector such as the one included in RTK.

This seems like a good approach.

> [@Gabriele\_Belotti](#):
>
> I’m looking into this but the real issue is that the Siddon-Jacobs class in the original implementation is an image function exploited as Interpolator while rtkCudaForwardProjectionImageFilter.h defines an image filter

Some refactoring may be required.

---

<div class="post-metadata">

### Author: ![Gabriele\_Belotti](https://discourse.itk.org/user_avatar/discourse.itk.org/gabriele_belotti/32/825_2.png) [@Gabriele\_Belotti](https://discourse.itk.org/u/Gabriele_Belotti)
#### Post date: [June 30, 2019, 3:29pm UTC](https://discourse.itk.org/t/twoprojectionregistration-2d-3d-registration/1972/3 "2019-06-30T15:29:14Z")

</div>

Ok, I will look into refactoring Simon’s implementation…  
Meanwhile, I found the metric calculation (reimplementation of Normalized Correlation) to be quite heavy and time consuming wrt the rest of the application… I will try to check speed ups using masks since using any other metric would require a full reimplementation
