# Exporting volume (3D texture)?

**URL:** <https://discourse.slicer.org/t/exporting-volume-3d-texture/1103>\
**Category:** Support\
**Created:** [September 22, 2017, 1:30pm UTC](https://discourse.slicer.org/t/exporting-volume-3d-texture/1103 "2017-09-22T13:30:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_D](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@John\_D](https://discourse.slicer.org/u/John_D)\
**Post date:** [September 22, 2017, 1:30pm UTC](https://discourse.slicer.org/t/exporting-volume-3d-texture/1103/1 "2017-09-22T13:30:33Z")

</div>

I’m totally new to Slicer and fairly new to DICOM, working on CT data. My use-case is using Slicer to export data-sets for real-time rendering and high performance.

I’ve already seen tutorials on using Slicer to create 3D meshes/surfaces from my CT dataset using thresholds, and I think these meshes can be saved as STL(?)

Another thing I’d like to do is convert the DICOM CT dataset into a raw 3D volume and export this as a 3D texture/image. I’m not sure I know the correct terminology because while I find material on volume rendering, this specific task I cannot find instructions for. Is it something I can easily do?

---

<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 22, 2017, 1:42pm UTC](https://discourse.slicer.org/t/exporting-volume-3d-texture/1103/2 "2017-09-22T13:42:46Z")

</div>

> [@John\_D](#):
>
> I’ve already seen tutorials on using Slicer to create 3D meshes/surfaces from my CT dataset using thresholds, and I think these meshes can be saved as STL(?)

Yes. The process is described for example in [this tutorial](https://www.slicer.org/wiki/Documentation/Nightly/Training#Segmentation_for_3D_printing).

> [@John\_D](#):
>
> convert the DICOM CT dataset into a raw 3D volume and export this as a 3D texture/image

You can visualize many structures very nicely using volume rendering of the CT volume. To get nice colorful images, you need to map CT voxel values to color&opacity RGBA values (and there are a couple of tricks to make the rendering faster and nicer). Volume rendering is a well-established technique, most likely you can find existing implementation on any platforms, so probably you don’t need to implement it yourself.

---

<div class="post-metadata">

**Author:** ![John\_D](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@John\_D](https://discourse.slicer.org/u/John_D)\
**Post date:** [September 22, 2017, 2:43pm UTC](https://discourse.slicer.org/t/exporting-volume-3d-texture/1103/3 "2017-09-22T14:43:22Z")

</div>

Thankyou.

I can appreciate many toolkits automatically do volumetric rendering from  
a set of slices, but I would still be interested to know if there is a way  
I can directly export this. In other words use Slicer to load a CT  
dataset’s set of slices, and export effectively just a 3D array of this.  
For real-time, performance rendering, 3D textures may be applied to  
polygonal meshes so having the volumetric data in this raw form is still  
useful to me.

Since as I understand it a CT scan contains multiple sets of slices from  
multiple axes, how to combine these is not obvious to me… I could simply  
take all the slices in one axes and stack them into a volume but that would  
lose a substantial amount of data!

Apologies if this isn’t clear, the terminology I use is not necessarily the  
same as yours.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 22, 2017, 3:05pm UTC](https://discourse.slicer.org/t/exporting-volume-3d-texture/1103/4 "2017-09-22T15:05:31Z")

</div>

Volume rendering is only a visualization technique. There is no way to “export” volume rendering, because it is created _directly_ from the CT volume and a transfer function determining the colors and opacities for the density values in the CT voxels. Read more here

> [@Save volume rendering as STL file](https://discourse.slicer.org/t/save-volume-rendering-as-stl-file/524):
>
> Hello, I am a new user on 3D slicer. I was using the display preset feature under volume rendering, and I was wondering if there is a way to save what I was viewing as an .stl or 3D printable file. For example, I was viewing a sample MRI using the CT-cardiac3 preset display. When I tried to save that specific 3D preset displayed sample in a .stl file, the option was unavailable. I was only able to see .vp (volume property), .txt formats. Is there a way to accomplish what I desire in 3D slic…
