# How to handle the mirroring effect

**URL:** https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656
**Category:** Support
**Created:** [November 9, 2023, 8:34am UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656 "2023-11-09T08:34:54Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Limz90](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@Limz90](https://discourse.vtk.org/u/Limz90)
#### Post date: [November 9, 2023, 8:34am UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/1 "2023-11-09T08:34:54Z")

</div>

Hi there,  
I have to handle the mirroring effect for some of my data; to do so, i applied the scaling of -1 of the data actor but the thing is the volume data diseappears; so when I zoom in very close, it appears again.  
How can i solve this?  
Thanks

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [November 9, 2023, 3:51pm UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/2 "2023-11-09T15:51:35Z")

</div>

Hi,

Can you, please, share de code?

regards,

PC

---

<div class="post-metadata">

### Author: ![Limz90](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@Limz90](https://discourse.vtk.org/u/Limz90)
#### Post date: [November 9, 2023, 4:37pm UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/3 "2023-11-09T16:37:48Z")

</div>

![image](https://discourse.vtk.org/uploads/default/original/2X/1/1d4af984b4684357c1fe3c0977812270a43def10.jpeg)

The mirroring effect has gone as i wanted but I have to zoom in order to see the volume again.  
Thanks

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [November 9, 2023, 5:39pm UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/4 "2023-11-09T17:39:02Z")

</div>

I believe you need to share way more than just that.

---

<div class="post-metadata">

### Author: ![Limz90](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@Limz90](https://discourse.vtk.org/u/Limz90)
#### Post date: [November 13, 2023, 8:28am UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/5 "2023-11-13T08:28:55Z")

</div>

Well, the only thing I did after rendering my volume using vtkSmartVolumeMapper (the left image), is to grap the volume actor and apply the scaling (the rigth image). I don’t know what else you want to know!

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [November 13, 2023, 2:12pm UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/6 "2023-11-13T14:12:24Z")

</div>

I’m not sure if mappers work if you apply a user transform with a negative determinant (e.g., invert a single axis), because that essentially turns the actor inside out. Maybe it is not that but you simply need to update your camera clipping planes to account for the new position of the volume.

However, you would be much better off spending time with understanding why do you have image flip and fix that. Maybe your image is flipped because you have not ordered the slices correctly.

---

<div class="post-metadata">

### Author: ![Limz90](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@Limz90](https://discourse.vtk.org/u/Limz90)
#### Post date: [November 14, 2023, 7:36am UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/7 "2023-11-14T07:36:16Z")

</div>

Thank you, I will see the camera flipping planes.  
And for the volume, I know why it has the mirror effect; also I do want to have mirror effect correction in my application .  
Thanks

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [November 14, 2023, 11:57am UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/8 "2023-11-14T11:57:19Z")

</div>

Clipping planes (not flipping). If that does not solve all the issues then you may need to change the image data (resample) instead of just changing the rendering actor.

---

<div class="post-metadata">

### Author: ![Limz90](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@Limz90](https://discourse.vtk.org/u/Limz90)
#### Post date: [November 15, 2023, 12:50pm UTC](https://discourse.vtk.org/t/how-to-handle-the-mirroring-effect/12656/9 "2023-11-15T12:50:49Z")

</div>

Okay, thank you. I will try that!
