# How to visualize 2d xray and 3d model overlapped

**URL:** <https://discourse.slicer.org/t/how-to-visualize-2d-xray-and-3d-model-overlapped/13142>\
**Category:** Support\
**Created:** [August 24, 2020, 4:06pm UTC](https://discourse.slicer.org/t/how-to-visualize-2d-xray-and-3d-model-overlapped/13142 "2020-08-24T16:06:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry\_Cope](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/henry_cope/32/6945_2.png) [@Henry\_Cope](https://discourse.slicer.org/u/Henry_Cope)\
**Post date:** [August 24, 2020, 4:06pm UTC](https://discourse.slicer.org/t/how-to-visualize-2d-xray-and-3d-model-overlapped/13142/1 "2020-08-24T16:06:32Z")

</div>

Hi all,  
Is it possible to visualize a 2D Xray in the same space as a 3D volume inside the 3D only viewer? I realize that from the start, it’s obvious that 2D will not appear in 3D. But is there any way to include it as a plane with depth 1 pixel or however many are need to be drawn in the 3D viewer? I’m trying to visually align blood vessels to see how good/bad the original CT volume segmentation is compared to a contrast injected XRay. Ideally, I could visualize the 2D XRay as the background and then rotate the 3D volume above it until it is aligned

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 24, 2020, 4:20pm UTC](https://discourse.slicer.org/t/how-to-visualize-2d-xray-and-3d-model-overlapped/13142/2 "2020-08-24T16:20:18Z")

</div>

Yes, this is perfectly doable. Click the “eye” icon in [slice view controls](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html#slice-view) to show the slice in 3D.

It is up to you to set up the camera to match the X-ray projection. It is quite simple:

- camera position is the X-ray generator position
- camera focal point is the image centerpoint position
- camera up vector is one of the image axis
- camera view angle is computed from source-to-image distance (distance between camera position and centerpoint) and image size

---

<div class="post-metadata">

**Author:** ![Henry\_Cope](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/henry_cope/32/6945_2.png) [@Henry\_Cope](https://discourse.slicer.org/u/Henry_Cope)\
**Post date:** [August 24, 2020, 4:21pm UTC](https://discourse.slicer.org/t/how-to-visualize-2d-xray-and-3d-model-overlapped/13142/3 "2020-08-24T16:21:31Z")

</div>

Thank you Mr. Lasso, that did the trick
