# Vtk.js, VTP Volume Rendering

**URL:** https://discourse.vtk.org/t/vtk-js-vtp-volume-rendering/4064
**Category:** Web
**Created:** [August 24, 2020, 11:14pm UTC](https://discourse.vtk.org/t/vtk-js-vtp-volume-rendering/4064 "2020-08-24T23:14:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![samm-vs](https://discourse.vtk.org/user_avatar/discourse.vtk.org/samm-vs/32/2173_2.png) [@samm-vs](https://discourse.vtk.org/u/samm-vs)
#### Post date: [August 24, 2020, 11:14pm UTC](https://discourse.vtk.org/t/vtk-js-vtp-volume-rendering/4064/1 "2020-08-24T23:14:24Z")

</div>

Does Vtk.js support volume rendering/ volume contours from vtp files? If it can’t are there any workaround for it? I have data that is in a vtp format and I would like to do the same things with it as if they were vti files(slicing, iso-surfaces and such). Is there a way that vtk.js can accomplish that?

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [August 25, 2020, 12:18pm UTC](https://discourse.vtk.org/t/vtk-js-vtp-volume-rendering/4064/2 "2020-08-25T12:18:00Z")

</div>

vtk.js supports rendering 3D geometry (see [GeometryViewer](https://kitware.github.io/vtk-js/examples/GeometryViewer.html)), and you can use [vtkCutter](https://kitware.github.io/vtk-js/examples/Cutter.html) to slice geometry.

---

<div class="post-metadata">

### Author: ![samm-vs](https://discourse.vtk.org/user_avatar/discourse.vtk.org/samm-vs/32/2173_2.png) [@samm-vs](https://discourse.vtk.org/u/samm-vs)
#### Post date: [August 25, 2020, 2:25pm UTC](https://discourse.vtk.org/t/vtk-js-vtp-volume-rendering/4064/3 "2020-08-25T14:25:25Z")

</div>

I guess the question is, can I render an unstructured grid structure like with vtp without losing the internal area. Well but the area inside is empty when I use a vtp datafile. It seems that it’s just the outer surface that is being rendered and there is no volume inside that surface. I am trying to do the same operations on the vtp file as a vdi file. I want to be able to slice the vtp object and use a scaler colormap to see the changes in color as I slice layer by layer.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 25, 2020, 4:33pm UTC](https://discourse.vtk.org/t/vtk-js-vtp-volume-rendering/4064/4 "2020-08-25T16:33:41Z")

</div>

vtk.js provide the rendering pipeline of VTK/C++ which means that you can do VolumeRendering with vtkImageData and Geometry rendering with vtkPolyData.

In term of processing we don’t have the same support as VTK/C++ that will automatically convert filter output to a vtkPolyData so it can be rendered in an interactive manner when you do contour, clip and slices.

To achieve such interactivity in the web without a server that has VTK or ParaView. Your best bet would be to use [VTK with WebAssembly](https://gitlab.kitware.com/vtk/vtk/-/tree/master/Examples/Emscripten/Cxx).

Otherwise you can go the route of ParaViewWeb for dynamic data processing and use vtk.js on the client side to either render the dynamically generated geometry (polydata) or a remote rendered image.
