# How to display a transformed single image in 3D view?

**URL:** <https://discourse.slicer.org/t/how-to-display-a-transformed-single-image-in-3d-view/27658>\
**Category:** Support\
**Created:** [February 6, 2023, 1:40pm UTC](https://discourse.slicer.org/t/how-to-display-a-transformed-single-image-in-3d-view/27658 "2023-02-06T13:40:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wrc](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wrc](https://discourse.slicer.org/u/wrc)\
**Post date:** [February 6, 2023, 1:40pm UTC](https://discourse.slicer.org/t/how-to-display-a-transformed-single-image-in-3d-view/27658/1 "2023-02-06T13:40:07Z")

</div>

Hi, I want to display one single 2D image in 3D view. I input the image as a volume node and apply a transform to it. However, if I try to make rotation / translation, the image in 3D view will become incomplete or disappeared. I think it is because the image in 3D view is only a slice with a fixed section and a limited area. How to display it under any transform? Thank you.

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [February 8, 2023, 6:08am UTC](https://discourse.slicer.org/t/how-to-display-a-transformed-single-image-in-3d-view/27658/2 "2023-02-08T06:08:11Z")

</div>

Displaying objects in the 3D view may require re-centering the view.

There is a button in the 3D view widget for re-centering the view:

![2b41629bf071c9b19a13136e63d509f1557e62e5](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/d/0d11786b8dfbd99e99452de4e5d4333e6cb53354.png)  
_(extracted from [How, from python-scritps, to trigger the click-function of "center of the 3D view on the scene"? - #8 by aiden.zhu](https://discourse.slicer.org/t/how-from-python-scritps-to-trigger-the-click-function-of-center-of-the-3d-view-on-the-scene/8181/8))_

You can use the following python snippet if you prefer to do that programmatically (_from [Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#center-the-3d-view-on-the-scene)_):

```python
layoutManager = slicer.app.layoutManager()
threeDWidget = layoutManager.threeDWidget(0)
threeDView = threeDWidget.threeDView()
threeDView.resetFocalPoint()

```

---

<div class="post-metadata">

**Author:** ![wrc](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wrc](https://discourse.slicer.org/u/wrc)\
**Post date:** [February 8, 2023, 12:31pm UTC](https://discourse.slicer.org/t/how-to-display-a-transformed-single-image-in-3d-view/27658/3 "2023-02-08T12:31:39Z")

</div>

Thank you. I tried the "center view: button. Only when both the image and its rotation are on the plane of the slice, it works. In other cases, the image will also become incomplete or disappeared. I am looking for a method which can reformat the slice according to a given transform.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 8, 2023, 12:53pm UTC](https://discourse.slicer.org/t/how-to-display-a-transformed-single-image-in-3d-view/27658/4 "2023-02-08T12:53:30Z")

</div>

The Slice views represent planes in patient space (RAS). Your 2D image is also a plane in patient space, so if you move it with a transform it will no longer be the same as the slice view. You can reset a slice view to match the displayed volume with the Rotate to volume plane button. If you need to do this in python you can research the underlying logic API.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/c/bc27f7c495abb7e972ba367b29dba13abb405141.png)
