# Mirror brain CT

**URL:** <https://discourse.slicer.org/t/mirror-brain-ct/19545>\
**Category:** Support\
**Created:** [September 7, 2021, 1:47pm UTC](https://discourse.slicer.org/t/mirror-brain-ct/19545 "2021-09-07T13:47:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartvandijken](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@bartvandijken](https://discourse.slicer.org/u/bartvandijken)\
**Post date:** [September 7, 2021, 1:47pm UTC](https://discourse.slicer.org/t/mirror-brain-ct/19545/1 "2021-09-07T13:47:46Z")

</div>

Operating system: MacOS  
Slicer version: 4.8.1

I’m trying to create a mean radiotherapy dose map on a cohort of 12 brain tumor patients with dose accumulation and isodose lines using the RT extension. However, I first want to ‘flip/mirror’ 5 patients so all tumors are located on the “same” side/hemisphere. What is the easiest way to mirror the entire scan?

The surface toolbox works with input models/segmentations and thus is not helpful. I’ve tried to change the upper left value of the matrix (1 to -1) in the linear transform matrix, but then all disappears.

---

<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:** [September 8, 2021, 2:02am UTC](https://discourse.slicer.org/t/mirror-brain-ct/19545/2 "2021-09-08T02:02:09Z")

</div>



---

<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:** [September 8, 2021, 2:05am UTC](https://discourse.slicer.org/t/mirror-brain-ct/19545/3 "2021-09-08T02:05:47Z")

</div>

Inverting coordiante values not just mirrors but also repositions the objects. You need to click [“Reset field of view” button](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html#slice-view) to update the slice view to this new position.

Also make sure to update Slicer to the latest version. We have made hundreds of fixes and improvements since Slicer-4.8.1.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 8, 2021, 6:46am UTC](https://discourse.slicer.org/t/mirror-brain-ct/19545/4 "2021-09-08T06:46:15Z")

</div>

> [@bartvandijken](#):
>
> but then all disappears

I’ve tried that in a recent version on Linux. Noticed that left/right does flip in the slice views while remaining visible, but it’s a volume rendering that disappears in 3D view. If you select a layout with two 3D views, one of them still shows a volume render.

Alternatively, you might use Filtering/Simple Filters/FlipImageFilter, and flip along the X axis and about origin. Here it’s not a transform, voxels are really moved around.

All, if I rightly understand your problem.

---

<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:** [September 8, 2021, 2:14pm UTC](https://discourse.slicer.org/t/mirror-brain-ct/19545/5 "2021-09-08T14:14:33Z")

</div>

When you apply a transform that has negative determinant (such as mirroring along a single axis), it turns the object inside out. This is bad for all data objects and can be resolved differently for each type.

For volumes, you can restore a meaningful geometry by resampling. For mirroring, the FlipImageFilter that @chir.set recommended above is the simplest solution. In general, for any kind of transform (warping, mirroring, shearing, …), you can use “Crop volume” module that allows you to resample the transformed volume into any rectangular region at any resolution.
