How to ensure DRR generated image has the same size as Input Xray image during 2d/3dregistration

Good Morning All,

I have a question regarding the itk2d3dregistration module. I’m using it to register a CT liver volume to an XRay of said liver. I’ve extracted the vessels in both the 2d and 3d images and used those as my inputs. The registration runs well and outputs a 2d DRR with the correct orientation. However, the output’s size is smaller than the input. I would like to have these be equal in size. How would I change my code?
Here’s the input xray vessels I’m registering to:
And the output xray:
And here they are overlaid so that you can see the size difference better:

  1. make sure you are doing registration in physical space
  2. you can surely set some parameters which control the size of the generated DRR

Hi Dr. Zukić,

  1. I believe that I am doing the registration in physical space.
  2. Ah yes I’ve found those parameters, but it seems that I didn’t explain my issue as clearly as I now can.
    The size of the output DRR and the XRay are the same, as are the spacing and origin. But as you can see the images are not the same, because the 3D model is smaller than the XRay. So the 3D model is projected but then all the pixels outside of this region are set to 0. My more specific question is now “Is there a way to stretch the outputDRR to match the XRay image and if so would it have something to do with the source to distance parameter of the RayCastInterpolator?”

Either that, or camera view angle. Reduce the distance, or reduce the viewing angle.

Thank you for the suggestions. I’m trying to play with the distance right now. I can’t find any mention of viewing angle in the code example. Would that be inside the interpolator or the writer function?

I am not familiar with that code. Viewing angle might be implicit or hard-coded.