# Export 3D image partial opacity

**URL:** https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816
**Category:** Support
**Created:** [July 20, 2021, 11:41am UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816 "2021-07-20T11:41:53Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Chuns\_SS](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chuns_ss/32/10007_2.png) [@Chuns\_SS](https://discourse.slicer.org/u/Chuns_SS)
#### Post date: [July 20, 2021, 11:41am UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/1 "2021-07-20T11:41:53Z")

</div>

Hi is there a way to export a 3D image with reduced opacity?

 ![Screenshot from 2021-07-19 21-35-14](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/0/c0f237eb394e90a6f112d76182605d67672256b1.jpeg)

---

<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: [July 20, 2021, 1:58pm UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/2 "2021-07-20T13:58:08Z")

</div>

What kind of export do you need?

---

<div class="post-metadata">

### Author: ![Chuns\_SS](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chuns_ss/32/10007_2.png) [@Chuns\_SS](https://discourse.slicer.org/u/Chuns_SS)
#### Post date: [July 20, 2021, 4:29pm UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/3 "2021-07-20T16:29:59Z")

</div>

Currently I’m working with obj format.

---

<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: [July 20, 2021, 5:57pm UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/4 "2021-07-20T17:57:21Z")

</div>

[Slicer uses](https://github.com/Slicer/Slicer/blob/edc1d6e34dc3a4833212b25e92d367a9f244ff2c/Libs/MRML/Core/vtkMRMLModelStorageNode.cxx#L668-L713) the `vtkOBJExporter` class to capture the data, so you [check the docs on that](https://vtk.org/doc/nightly/html/classvtkOBJExporter.html). OBJ may not directly support all the styling that Slicer provides.

---

<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: [July 20, 2021, 7:31pm UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/5 "2021-07-20T19:31:15Z")

</div>

You can use [Slicer’s OpenAnatomy exporter](https://github.com/PerkLab/SlicerOpenAnatomy) to export to glTF and OBJ format, using colors, and as far as I remember, also opacities. It is just a short Python script, so you can easily adjust it so that it outputs exactly what you need.

Would you like to export for AR/VR viewing?

---

<div class="post-metadata">

### Author: ![Chuns\_SS](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chuns_ss/32/10007_2.png) [@Chuns\_SS](https://discourse.slicer.org/u/Chuns_SS)
#### Post date: [July 20, 2021, 8:23pm UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/6 "2021-07-20T20:23:23Z")

</div>

Thank-you Steve and Andras for your guidance. I will check the documentation on VTK and try the exporter from perkLabs.  
So far I do not need AR/VR viewing.

---

<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: [July 20, 2021, 9:46pm UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/7 "2021-07-20T21:46:39Z")

</div>

> [@Chuns\_SS](#):
>
> So far I do not need AR/VR viewing.

I was just wondering how you were going to use the exported models and export to Unity for AR/VR viewing is a common use case. What is the goal of the export? If you can tell more about your application then we could direct you to prior work that you can build on or to other groups that you could collaborate with.

---

<div class="post-metadata">

### Author: ![Chuns\_SS](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chuns_ss/32/10007_2.png) [@Chuns\_SS](https://discourse.slicer.org/u/Chuns_SS)
#### Post date: [July 21, 2021, 12:50am UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/8 "2021-07-21T00:50:47Z")

</div>

Andras, I am a surgeon and am interested in the clincal application of the semgented images. I was fascinated by all the work that is being done on autosegmentation but I think the real usefulness lies elsewhere. Obviously my background is not coding or computer science so I’m just working on a few ideas on my own, albeit very slowly!

---

<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: [July 21, 2021, 1:13am UTC](https://discourse.slicer.org/t/export-3d-image-partial-opacity/18816/9 "2021-07-21T01:13:04Z")

</div>

OK. Let us know if we can help with anything. There are many surgeons among Slicer users, planning, guiding, and evaluating a wide range of procedures (neuro, cardiac, musculoskeletal, prostate, breast, liver, lung,…) for over 20 years, so there is a lot you can build on.
