# GetDRRSiddonJacobsRayTracing returns empty image for certain angles

**URL:** https://discourse.itk.org/t/getdrrsiddonjacobsraytracing-returns-empty-image-for-certain-angles/4626
**Category:** Algorithms
**Created:** [November 30, 2021, 3:43pm UTC](https://discourse.itk.org/t/getdrrsiddonjacobsraytracing-returns-empty-image-for-certain-angles/4626 "2021-11-30T15:43:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Steven](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Steven](https://discourse.itk.org/u/Steven)
#### Post date: [November 30, 2021, 3:43pm UTC](https://discourse.itk.org/t/getdrrsiddonjacobsraytracing-returns-empty-image-for-certain-angles/4626/1 "2021-11-30T15:43:04Z")

</div>

I created a so-called “virtual C-arm” using the function GetDRRSiddonJacobsRayTracing Algirhtm [1], but for certain angles the resulting image is black. The following commands were used to generate the DRR’s. The angle difference is only 1 degree but one image is a normal DRR while the other image is all black.

Does anybody know why this happens? is there a solution to create DRR’s of all angles

getDRRSiddonJacobsRayTracing -rp 90 -rx 90 -ry 10 -rz 0 -t 0 147.0 -118.5 -iso 140 140 65 -res 0.5 0.5 -size 600 600 -o run1.tif CT.img = all black image  
getDRRSiddonJacobsRayTracing -rp 90 -rx 90 -ry 9 -rz 0 -t 0 147.0 -118.5 -iso 140 140 65 -res 0.5 0.5 -size 600 600 -o run2.tif CT.img = normal DRR image

[1] [[ITKTwoProjectionRegistration/GetDRRSiddonJacobsRayTracing.cxx at master · InsightSoftwareConsortium/ITKTwoProjectionRegistration · GitHub](https://github.com/InsightSoftwareConsortium/ITKTwoProjectionRegistration/blob/master/test/GetDRRSiddonJacobsRayTracing.cxx) ]

---

<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 30, 2021, 4:00pm UTC](https://discourse.itk.org/t/getdrrsiddonjacobsraytracing-returns-empty-image-for-certain-angles/4626/2 "2021-11-30T16:00:04Z")

</div>

@simon.rit might be able to answer.

---

<div class="post-metadata">

### Author: ![simon.rit](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@simon.rit](https://discourse.itk.org/u/simon.rit)
#### Post date: [November 30, 2021, 4:17pm UTC](https://discourse.itk.org/t/getdrrsiddonjacobsraytracing-returns-empty-image-for-certain-angles/4626/3 "2021-11-30T16:17:36Z")

</div>

No sorry. I don’t see anything wrong with your code and I would have to dig in the code to understand the problem… Maybe you can check if the `transform` defined in the code is meaningful by adding an `itk::ResampleImageFilter`? I would also write the image in float, before rescaling, to check that there is not something dense that comes in the field of view when you rotate by 1 degree which would perturbate the operation.

---

<div class="post-metadata">

### Author: ![Steven](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/94ad74/32.png) [@Steven](https://discourse.itk.org/u/Steven)
#### Post date: [December 1, 2021, 9:38am UTC](https://discourse.itk.org/t/getdrrsiddonjacobsraytracing-returns-empty-image-for-certain-angles/4626/4 "2021-12-01T09:38:24Z")

</div>

Thanks, I will look into it!
